X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;fp=src%2Fposition.h;h=ce03c34f3325de63102b910ff570b3456f0e8b31;hp=2aeb8fcd575e8275a6348cc7fefa72b5695d7b84;hb=b0658f09b93185e2b43d4b2d6f0daa30c36ebcc2;hpb=871ab55f01f844bd24ed768c5e734ed2c956ef78 diff --git a/src/position.h b/src/position.h index 2aeb8fcd..ce03c34f 100644 --- a/src/position.h +++ b/src/position.h @@ -39,6 +39,7 @@ struct StateInfo { // Copied when making a move Key materialKey; + Key pawnKey; Value nonPawnMaterial[COLOR_NB]; int castlingRights; int rule50; @@ -146,6 +147,7 @@ class Position { Key key() const; Key key_after(Move m) const; Key material_key() const; + Key pawn_key() const; // Other properties of the position Color side_to_move() const; @@ -293,6 +295,8 @@ inline Key Position::adjust_key50(Key k) const { return st->rule50 < 14 - AfterMove ? k : k ^ make_key((st->rule50 - (14 - AfterMove)) / 8); } +inline Key Position::pawn_key() const { return st->pawnKey; } + inline Key Position::material_key() const { return st->materialKey; } inline Value Position::non_pawn_material(Color c) const { return st->nonPawnMaterial[c]; }