Add player's pieces list management + change board def.

This commit is contained in:
2021-10-30 22:03:17 +02:00
parent f0d209a292
commit 4bba067cd6
8 changed files with 114 additions and 37 deletions

View File

@@ -25,10 +25,14 @@ typedef struct position {
square_t en_passant;
short clock_50;
short curmove;
eval_t eval;
struct list_head pieces_white;
struct list_head pieces_black;
board_t *board;
struct list_head w_pieces, b_pieces;
} pos_t;
/* TODO: replace piece2string/piece2char with static array*/
char *piece2string(piece_t piece);
void pos_print(pos_t *pos);
pos_t *pos_init(pos_t *pos);
pos_t *pos_startpos(pos_t *pos);