www.pudn.com > FiveChess.rar > Match.cpp


// Match.cpp: implementation of the Match class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#include "stdafx.h" 
#include "FiveChess.h" 
#include "Match.h" 
 
#ifdef _DEBUG 
#undef THIS_FILE 
static char THIS_FILE[]=__FILE__; 
#define new DEBUG_NEW 
#endif 
 
////////////////////////////////////////////////////////////////////// 
// Construction/Destruction 
////////////////////////////////////////////////////////////////////// 
 
Match::Match() 
{ 
	for(int i=0;i=LW||y<0||y>=LW) 
		return FALSE; 
	if(chessboard[x][y]!=0) 
		return FALSE; 
	chessboard[x][y]=who; 
	return TRUE; 
} 
BOOL Match::IsWin(int who,int pos[5][2]) 
{ 
	int i,j; 
	for(i=0;i0&&j+4