X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbook.cpp;h=da45b32484c47abf8142ef5c537a8a417a28fcb0;hp=8d021ab262118d3a529b1eec2e52aea9690572b4;hb=f99cb3dc27719021e126690b7fd5aa5f43663ed8;hpb=dd4e5db2be2eb5631d739af634cb33bea2f3fddd diff --git a/src/book.cpp b/src/book.cpp index 8d021ab2..da45b324 100644 --- a/src/book.cpp +++ b/src/book.cpp @@ -49,7 +49,7 @@ namespace { Key PolyGlotRandoms[781]; struct { Key psq[12][64]; // [piece][square] - Key castle[4]; // [castle right] + Key castling[4]; // [castling flag] Key enpassant[8]; // [file] Key turn; } Zobrist; @@ -332,10 +332,10 @@ namespace { key ^= PG.Zobrist.psq[2 * (type_of(p) - 1) + (color_of(p) == WHITE)][s]; } - b = pos.can_castle(ALL_CASTLES); + b = pos.can_castle(ANY_CASTLING); while (b) - key ^= PG.Zobrist.castle[pop_lsb(&b)]; + key ^= PG.Zobrist.castling[pop_lsb(&b)]; if (pos.ep_square() != SQ_NONE) key ^= PG.Zobrist.enpassant[file_of(pos.ep_square())];