⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 judge.h

📁 搜索算法部分使用minmax递归
💻 H
字号:
#include "Board.h"	// Added by ClassView
#include "Record.h"	// Added by ClassView
#include "Player.h"	// Added by ClassView
#include "WinDlg.h"
class COthelloDoc;
#ifndef JUDGE_H
#define JUDGE_H
class CJudge {
public:
	enum {SPACE,BLACK,WHITE,ENABLE,HUMAN =80,AI,H2H,H2A,A2H,A2A};
	bool m_GoHuman,m_GoAI,m_Gameover;
	int m_Model,m_Counter,m_Depth,m_EvaluateType;
	bool m_Hint,m_Change;
	CPlayer* m_Player;
	CJudge(COthelloDoc* doc);
	virtual ~CJudge();
	void Initiate();
	void SetModel();
	void Play();
	void GoOn();
	void Draw(CDC* pDC,int cell,int bg);
	int Undo();
	int Redo();
	void Open();
	void Repeat();
	int Display();
private:
/* Private Variable */
	CRecord m_Record;
	COthelloDoc* pDoc;		
	CBoard m_Board;
	CWinDlg* m_WinDlg;

	int m_Turn;
	int m_Player1, m_Player2;
	int m_State[8][8];
	int m_Black,m_White;
//	int m_BackGround;
/* Private Function */
	bool Search();
	bool Direction8(int x,int y);
	void CleanState();
	void Change(int x,int y);
	void TurnChange();
	void GetBoard();
	void WhoseTurn();
	void Drop(int x,int y,int color);
	void UnChange();
	void Pass();
	void Counter();
	friend class COthelloDoc;
	int temp;

};
#endif

⌨️ 快捷键说明

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