aboutsummaryrefslogtreecommitdiff
path: root/src/zobrist.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-08-18 11:26:44 +0200
committerAdam <adammegarules1@gmail.com>2026-08-18 11:26:44 +0200
commit419f931a8001ca1c8c5960d68ae6bdef53c76f16 (patch)
treeb6162a5d4324fb4df8e831aff3a1a869d794daca /src/zobrist.cpp
parent8a3d56d5bb57b58fa60966edcec0b33d3c2d1041 (diff)
refactor(book): refactoring opening book code
Diffstat (limited to 'src/zobrist.cpp')
-rw-r--r--src/zobrist.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/zobrist.cpp b/src/zobrist.cpp
index 5250687..c06f1a2 100644
--- a/src/zobrist.cpp
+++ b/src/zobrist.cpp
@@ -312,9 +312,10 @@ static bool IsEnpassantLegal(Game *g) {
// PolyglotRandom64 layout (standard Polyglot spec):
// [0..767] piece keys, kind = (pieceType-1)*2 + color:
// [0-63] black pawn, [64-127] white pawn, [128-191] black knight,
-// [192-255] white knight, [256-319] black bishop, [320-383] white bishop,
-// [384-447] black rook, [448-511] white rook, [512-575] black queen,
-// [576-639] white queen, [640-703] black king, [704-767] white king
+// [192-255] white knight, [256-319] black bishop, [320-383] white
+// bishop, [384-447] black rook, [448-511] white rook, [512-575]
+// black queen, [576-639] white queen, [640-703] black king,
+// [704-767] white king
// [768] white kingside castling
// [769] white queenside castling
// [770] black kingside castling
@@ -326,7 +327,7 @@ void InitZobrist() {
// Piece keys: interleaved by kind = (pieceType-1)*2 + color
for (int kind = 0; kind < 12; ++kind) {
- int color = kind % 2; // 0=black, 1=white
+ int color = kind % 2; // 0=black, 1=white
int pieceType = (kind / 2) + 1; // PAWN=1..KING=6
for (int square = 0; square < 64; ++square) {
PieceKeys[color][pieceType][square] = PolyglotRandom64[idx++];