From 44c45eb9c40e8e0cc4b598851a6577b8da26700d Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Thu, 8 Dec 2022 00:33:23 -0800 Subject: started migration to board state as struct --- chesshelpers.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'chesshelpers.h') 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 -- cgit v1.3.1