]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Retire PieceOffset[] in book.cpp
[stockfish] / src / position.h
index d0087c3ba1c61968242de69b2d0858ea256fe179..55dc33feee917ea380f20110b4e5f27e0a527e3b 100644 (file)
@@ -60,6 +60,14 @@ struct StateInfo {
   StateInfo* previous;
 };
 
+struct ReducedStateInfo {
+  Key pawnKey, materialKey;
+  Value npMaterial[2];
+  int castleRights, rule50, pliesFromNull;
+  Score psqScore;
+  Square epSquare;
+};
+
 
 /// The position data structure. A position consists of the following data:
 ///
@@ -302,7 +310,7 @@ inline int Position::can_castle(CastleRight f) const {
 }
 
 inline int Position::can_castle(Color c) const {
-  return st->castleRights & ((WHITE_OO | WHITE_OOO) << c);
+  return st->castleRights & ((WHITE_OO | WHITE_OOO) << (2 * c));
 }
 
 inline bool Position::castle_impeded(Color c, CastlingSide s) const {