From c437220aab7b908995a87cf958d9a67e54d478cb Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 31 Jul 2026 19:07:24 +0200 Subject: keeping track of were all the pieces are --- src/board/board.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/board/board.hpp') diff --git a/src/board/board.hpp b/src/board/board.hpp index d1e379a..91a38f9 100644 --- a/src/board/board.hpp +++ b/src/board/board.hpp @@ -52,7 +52,8 @@ struct TranspositionsEntry { }; struct Game { Piece pieces[64]; - bool turn = true; // 1 white; 0 black + uint64_t PieceBitboard = 0; // used for quicly iterating over all squares + bool turn = true; // 1 white; 0 black bool whiteCastleKing = false; bool whiteCastleQueen = false; bool blackCastleKing = false; @@ -101,5 +102,6 @@ int PositionToIndex(Position i); UndoMove MakeMove(Move move, Game *g); void UnMakeMove(UndoMove undo, Game *g); -Position FindKing(Game *b, bool white); +Position FindKing(Game *g, bool white); +void UpdateBitboards(Game *g); #endif /* SRC_BOARD_H_ */ -- cgit v1.2.3