Fix Zobrist initialization for pawns in hand
authorianfab <ianfab@users.noreply.github.com>
Sat, 11 Aug 2018 20:05:48 +0000 (22:05 +0200)
committerianfab <ianfab@users.noreply.github.com>
Sat, 11 Aug 2018 20:06:47 +0000 (22:06 +0200)
No functional change for variants without drops.

src/position.cpp

index 17a57eb..c190358 100644 (file)
@@ -180,7 +180,7 @@ void Position::init() {
           Zobrist::checks[c][n] = rng.rand<Key>();
 
   for (Color c = WHITE; c <= BLACK; ++c)
-      for (PieceType pt = KNIGHT; pt <= KING; ++pt)
+      for (PieceType pt = PAWN; pt <= KING; ++pt)
           for (int n = 0; n < 17; ++n)
               Zobrist::inHand[make_piece(c, pt)][n] = rng.rand<Key>();