X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=928366bcf4307036d579ccd1cfd814a28f79e242;hp=93e0f91d675b4d3dae7d9c7102c5478c59382c1f;hb=1188141aa78d01c361582daaa73de5154b6d09b1;hpb=b7f643fe391d00fd9088587e8ef0ca520fa1480f diff --git a/src/position.h b/src/position.h index 93e0f91d..928366bc 100644 --- a/src/position.h +++ b/src/position.h @@ -322,7 +322,8 @@ inline int Position::pawns_on_same_color_squares(Color c, Square s) const { } inline Key Position::key() const { - return st->key; + return st->rule50 < 14 ? st->key + : st->key ^ make_key((st->rule50 - 14) / 8); } inline Key Position::pawn_key() const {