diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2022-12-08 00:33:23 -0800 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2022-12-08 00:33:23 -0800 |
| commit | 44c45eb9c40e8e0cc4b598851a6577b8da26700d (patch) | |
| tree | 22ef3ccc9c354739271226c81df470cc2d424add /chesshelpers.h | |
| parent | 26dff288134041d3245701b047be1d9a08c7c9d3 (diff) | |
started migration to board state as struct
Diffstat (limited to 'chesshelpers.h')
| -rw-r--r-- | chesshelpers.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/chesshelpers.h b/chesshelpers.h index 55a211a..523505a 100644 --- a/chesshelpers.h +++ b/chesshelpers.h @@ -9,10 +9,16 @@ typedef enum { queen = 5, king = 6, } piece_t; +typedef struct BoardState { + int** pieces; + int blackKingHasMoved; + int whiteKingHasMoved; + int lastPawnMove; +} board_t; +board_t init_board(int** board); int in_board(vector_t position); int is_empty(int** board, vector_t position); int is_color(int** board, vector_t position, int color); char* get_readable_coords(vector_t position); char* get_move_name(int** board, vector_t origin, vector_t end); -int** clone_board(int** board); #endif |
