judge.h
来自「搜索算法部分使用minmax递归」· C头文件 代码 · 共 55 行
H
55 行
#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 + =
减小字号Ctrl + -
显示快捷键?