X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=55dc33feee917ea380f20110b4e5f27e0a527e3b;hp=d0087c3ba1c61968242de69b2d0858ea256fe179;hb=6828325881eb823ddfb2e6ea72122c3a4576d240;hpb=b9bc6e823f061753419e563c4f923e60bd8c6193 diff --git a/src/position.h b/src/position.h index d0087c3b..55dc33fe 100644 --- a/src/position.h +++ b/src/position.h @@ -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 {