some defaults and the beggining of the init method
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
#ifndef CHESS_H
|
||||
#define CHESS_H
|
||||
|
||||
/* the "board" is the playable area on which
|
||||
* pieces move. pieces are represented by numbers:
|
||||
* 0 - no piece
|
||||
* 1 - pawn
|
||||
* 2 - rook
|
||||
* 3 - knight
|
||||
* 4 - bishop
|
||||
* 5 - queen
|
||||
* 6 - king
|
||||
*/
|
||||
|
||||
#define BOARD_HORIZONTAL 8
|
||||
#define BOARD_VERTICAL 8
|
||||
//int board[BOARD_VERTICAL][BOARD_HORIZONTAL];
|
||||
|
||||
// the default arrangment of pieces on the board
|
||||
#define BOARD_DEFAULT_CONFIG \
|
||||
{\
|
||||
{2,3,4,5,6,4,3,2}\
|
||||
{1,1,1,1,1,1,1,1}\
|
||||
{0,0,0,0,0,0,0,0}\
|
||||
{0,0,0,0,0,0,0,0}\
|
||||
{0,0,0,0,0,0,0,0}\
|
||||
{1,1,1,1,1,1,1,1}\
|
||||
{2,3,4,5,6,4,3,2}\
|
||||
}
|
||||
|
||||
// initializes the board with the default configuration of pieces
|
||||
bool init_board();
|
||||
|
||||
#endif // CHESS_H
|
||||
Reference in New Issue
Block a user