]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Improve play for closed positions
[stockfish] / src / position.h
index 93e0f91d675b4d3dae7d9c7102c5478c59382c1f..928366bcf4307036d579ccd1cfd814a28f79e242 100644 (file)
@@ -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 {