core.h

来自「vc2005编写黑白棋」· C头文件 代码 · 共 56 行

H
56
字号
#include<string>
using namespace std;
struct TPos
{
	int x;
	int y;
};
/*提供的接口服务
1 通知开始
2 通知dll名称
3 通知结束
4 通知清理
*/
class CBad
{
public:
	int iData[8][8];//当前棋局
	int iChessRecord[64][8][8];//记录棋盘数据
	string iBlackName;//黑方名字
	string iWhiteName;//白方名字
	int  iFirst;//谁先
	int  iWinner;//谁赢
	int iMode;//模式,0 比赛;1 录像
	int iTotalStep;
	int iStep;
	HWND hDlg;
	int iTurn;
	bool WalkFlag;
	HANDLE hThread;
	HANDLE hThreadUI;
	HINSTANCE hInst1;
	HINSTANCE hInst2;
	int iTimeLimit;
	bool bBlackLoad;
	bool bWhiteLoad;

	TPos iPos;
public:
	CBad();
	~CBad();
	bool LoadSuccess();
	void Exit();
	void Clear();
	bool SelecetDllName(string dll,int mark);
	bool JudgeEnd(int mark) const;
	bool SetPos(int mark) ;
	bool IsValidPos(TPos pos,int mark) const;
	int Count(int num);
	bool GameBegin();
public:
	void Wait();
	bool SetAMap();
	bool WriteFile();
public:

};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?