From 1d6a6717ba088c3b89d50021f2bf6656eb564533 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 29 Jul 2026 16:18:52 +0200 Subject: implementing castling --- src/zobrist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/zobrist.cpp') diff --git a/src/zobrist.cpp b/src/zobrist.cpp index 05d4cf2..cfc7769 100644 --- a/src/zobrist.cpp +++ b/src/zobrist.cpp @@ -49,16 +49,16 @@ uint64_t GenerateZobristKey(Game *b) { // castling int castle = 0; - if (b->castle.find('K') != std::string::npos) + if (b->whiteCastleKing) castle |= 1; - if (b->castle.find('Q') != std::string::npos) + if (b->whiteCastleQueen) castle |= 2; - if (b->castle.find('k') != std::string::npos) + if (b->blackCastleKing) castle |= 4; - if (b->castle.find('q') != std::string::npos) + if (b->blackCastleQueen) castle |= 8; key ^= CastleKeys[castle]; -- cgit v1.2.3