From 9d2a95f566c5cb31d92af969d052b665ccbea9be Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 2 Aug 2026 13:14:55 +0200 Subject: caching kign position --- 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 bcd0b95..869e223 100644 --- a/src/board/board.hpp +++ b/src/board/board.hpp @@ -53,7 +53,9 @@ struct TranspositionsEntry { struct Game { Piece pieces[64]; uint64_t PieceBitboard = 0; // used for quicly iterating over all squares - bool turn = true; // 1 white; 0 black + uint8_t WhiteKingPosition = 0; + uint8_t BlackKingPosition = 0; + bool turn = true; // 1 white; 0 black bool whiteCastleKing = false; bool whiteCastleQueen = false; bool blackCastleKing = false; @@ -102,6 +104,6 @@ UndoMove MakeMove(Move move, Game *g); void UnMakeMove(UndoMove undo, Game *g); Position FindKing(Game *g, bool white); -void UpdateBitboards(Game *g); +void UpdateHelpers(Game *g); void SetPiece(int i, PieceType type, bool color, Game *g); #endif /* SRC_BOARD_H_ */ -- cgit v1.2.3