aboutsummaryrefslogtreecommitdiff
path: root/src/zobrist.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-07-29 16:18:52 +0200
committerAdam <adammegarules1@gmail.com>2026-07-29 16:18:52 +0200
commit1d6a6717ba088c3b89d50021f2bf6656eb564533 (patch)
tree83c2ba1c3a89eacf63f8841ccfb93671c5b45bdf /src/zobrist.cpp
parent42c1050af70447e935ad1914e57ccecd9f278e7f (diff)
implementing castling
Diffstat (limited to 'src/zobrist.cpp')
-rw-r--r--src/zobrist.cpp8
1 files changed, 4 insertions, 4 deletions
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];