- const Key* ZobPiece = PolyGlotRandoms + 0;
- const Key* ZobCastle = PolyGlotRandoms + 768;
- const Key* ZobEnPassant = PolyGlotRandoms + 772;
- const Key* ZobTurn = PolyGlotRandoms + 780;
-
- // PieceOffset is calculated as 64 * (PolyPiece ^ 1) where PolyPiece
- // is: BP = 0, WP = 1, BN = 2, WN = 3 ... BK = 10, WK = 11
- const int PieceOffset[] = { 0, 64, 192, 320, 448, 576, 704, 0,
- 0, 0, 128, 256, 384, 512, 640 };
+ const Key* ZobPiece = PolyGlotRandoms;
+ const Key* ZobCastle = ZobPiece + 12 * 64; // Pieces * squares
+ const Key* ZobEnPassant = ZobCastle + 4; // Castle flags
+ const Key* ZobTurn = ZobEnPassant + 8; // Number of files