X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=game.h;h=e0fce79597fd6ae362979ef760d18ab4f78f4574;hp=ec50ab2e64af86cb07542c83c599723729333b34;hb=e15efca6667b2673b4c1a5879a6917eab6800e58;hpb=0d182b4efac85dce968068bfe4509e52e9a30051 diff --git a/game.h b/game.h index ec50ab2..e0fce79 100644 --- a/game.h +++ b/game.h @@ -10,11 +10,13 @@ #include "move.h" #include "util.h" -// constants +// defines -const int GameSize = 4096; +#define GameSize 4096 -enum status_t { +// types + +typedef enum { PLAYING, WHITE_MATES, BLACK_MATES, @@ -22,11 +24,11 @@ enum status_t { DRAW_MATERIAL, DRAW_FIFTY, DRAW_REPETITION -}; +} status_t; // types -struct game_t { +typedef struct { board_t start_board[1]; board_t board[1]; sint16 size; @@ -34,7 +36,7 @@ struct game_t { sint8 status; move_t move[GameSize]; uint64 key[GameSize]; -}; +} game_t; // variables @@ -53,7 +55,8 @@ extern int game_size (const game_t * game); extern int game_pos (const game_t * game); extern int game_move (const game_t * game, int pos); -extern void game_get_board (const game_t * game, board_t * board, int pos = -1); +extern void game_get_board (const game_t * game, board_t * board); +extern void game_get_board_ex (const game_t * game, board_t * board, int pos); extern int game_turn (const game_t * game); extern int game_move_nb (const game_t * game);