?? moves.h
字號:
/****************************************************
Author: S. Senthil kumar
Class Name: Moves
Purpose: To Generate Moves and store in a linked list
******************************************************/
class Moves
{
public:
OneMove *head; //Head of the linked list
OneMove *current; //Current node in the linked list
OneMove *acurrent;OneMove *ncurrent;//Current nodes in attack list, quiscent list
OneMove *attackhead; //Head of attack list
OneMove *normalhead; //Head of quiscent list
int tempboard[8][8]; //Temporary board
int size; //Total Size of the linked list (ie) Total moves generated
/*To add a move to the linked list
Arguments:
p: piece Id
sourcex,sourcey: Starting square
dx,dy: : Destination square
noa : Boolean variable to indicate whether attacking or quiscent move
*/
void add(int p,int sourcex,int sourcey,int dx,int dy,int noa);
/*Constructor*/
Moves();
/*Combines attack list and quiscent list with attack list at the head*/
void combine();
/*Destroys the linked list of moves*/
void destroy();
/*Main move generating routines
Arguments:
board[8][8] : Current board
int color : To Generate for white or black
*/
void GeneratePawnMoves(int board[8][8],int color);
void GenerateKnightMoves(int board[8][8],int color);
void GenerateBishopMoves(int board[8][8],int color);
void GenerateRookMoves(int board[8][8],int color);
void GenerateQueenMoves(int board[8][8],int color);
void GenerateKingMoves(int board[8][8],int color);
/*Driver Routine*/
int GenerateAllMoves(int board[8][8],int color,int depth,int check_for_mate);
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -