www.pudn.com > wuziqi.rar > Chess.h


// Chess.h: interface for the CChess class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_CHESS_H__8D579466_5251_4126_A14C_6E1612222683__INCLUDED_) 
#define AFX_CHESS_H__8D579466_5251_4126_A14C_6E1612222683__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include "Board.h" 
#include "Judge.h" 
class CChess   
{ 
public: 
	CChess(); 
	//void chessmove(); 
	virtual ~CChess(); 
	bool printresult(enum status,player); 
    int validmove(int , int); 
	bool move(player); 
	//int stone[15][15]; 
	//bool initate(); 
	enum status gamestatus(); 
	Board board; 
	void twoplayers(void);//双人游戏接口 
	void playercomputer(int);//人机对战接口 
	void iniwintable();//初始化获胜表 
	bool computermove();//计算机下子,AI算法 
	bool playermove(); 
	int tendence[2][572];//记录人机对战中当前的走势 
	bool computertable[15][15][572];//人机对战中记录计算机的获胜表 
	bool playertable[15][15][572];//人机对战中记录人的获胜表 
	int firsthand; 
	private: 
	int model; 
	Judge pjudge; 
	int temp[15][15];//存储上一步棋的信息,用来悔棋 
}; 
 
 
#endif // !defined(AFX_CHESS_H__8D579466_5251_4126_A14C_6E1612222683__INCLUDED_)