#ifndef _C_ROBOT_LOGIC_FRAME_H_INCLUDE_
#define _C_ROBOT_LOGIC_FRAME_H_INCLUDE_

#include "cdefines.h"
#include "GameLogic.h"

class CRobotLogicFrame : public RobotLogicFrame
{
public:
	/// 캯
	CRobotLogicFrame();
	/// 
	~CRobotLogicFrame();

	/// õǰ
	virtual void SetGamePlayer(Player* pPlayer,Room* pRoom) { m_g_myself = pPlayer; m_g_myselfRoom = pRoom;}

	/// ڴû׼Ϣ
	virtual void OnProcessPlayerReadyMes(int playerId);
	/// ڴûʼϷʼϢ
	virtual void OnProcessPlayerGameStartMes();
	/// ڴûϷϢ
	virtual void OnProcessPlayerGameOverMes(void);
	/// ڴûϷϢ
	virtual void OnProcessPlayerRoomMes(Json::Value &mes);
	/// û뷿Ϣ
	virtual void OnProcessEnterRoomMsg(int playerId);
	/// û뿪Ϣ
	virtual void OnProcessLeaveRoomMsg(int playerId);
	/// ûϢ
	virtual void OnProcessReEnterRoomMes(int playerId);
	/// ûϢ
	virtual void OnProcessOfflineRoomMes(int playerId);
	/// ûʱϢ
	virtual void OnProcessTimerMsg(int timerId,int curTimer);

private:
	Player *m_g_myself;
    Room *m_g_myselfRoom;

	CGameLogic m_GameLogic;


	int64				m_nUserGold[IDD_MAX_ROOM_USERCOUNT];		//ӵг
	int64				m_nBasicScore;								//ע

	int64				m_nTurnAddGold[IDD_MAX_ROOM_USERCOUNT];		//ע

	WORD				m_wHandCard[IDD_HAND_COUNT];				//

	int64				m_nTurnBasicAdd;							//ټע
	int64				m_nTurnBasicGold;							//ٸע

	//int64				m_nMaxTurnAdd;								//ע

	int					m_nBankUser;								//ׯ
	int					m_nSmallBlindUser;							//Сäע
	int					m_nBigBlindUser;							//äע
	int					m_nCurrentUser;								//ǰ


	WORD				m_wBoartCard[IDD_WEAVE_COUNT];				//
	int					m_nBoartCount;								//Ŀ

	WORD				m_wBestType;								//
	WORD				m_wBestWeave[IDD_WEAVE_COUNT];				//

	int					m_winType;									//Ӯ
	int					m_nAddCount;								//ע

	bool				m_bIsGameOver;

	int64				m_nWinGold[IDD_MAX_ROOM_USERCOUNT][IDD_MAX_ROOM_USERCOUNT];

public:
	//aiע
	void OnAiAddGold();
	//
	void ClearData();
};

#endif
