aboutsummaryrefslogtreecommitdiff
path: root/src/board/board.hpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-02 13:14:55 +0200
committerAdam <adammegarules1@gmail.com>2026-08-02 13:14:55 +0200
commit9d2a95f566c5cb31d92af969d052b665ccbea9be (patch)
treee6ceb7c1ba9c938f5aced88a667fa96d2533db31 /src/board/board.hpp
parentf948514c5337961444f555374523902ae94dd00f (diff)
caching kign position
Diffstat (limited to 'src/board/board.hpp')
-rw-r--r--src/board/board.hpp6
1 files changed, 4 insertions, 2 deletions
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_ */