X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=695ad98db8d9bf157effd8be06bc695effa4477a;hp=431d059c7efb2570305b752807dc10ac60c2266e;hb=6bc16f3ff162a46e5c06f8857865472757e46bf0;hpb=3d8140a54101a50860ba2e3eb0f2d6cce68bfe47 diff --git a/src/position.h b/src/position.h index 431d059c..695ad98d 100644 --- a/src/position.h +++ b/src/position.h @@ -48,10 +48,10 @@ class Position; struct StateInfo { Key pawnKey, materialKey; - int castleRights, rule50, gamePly, pliesFromNull; - Square epSquare; - Score value; Value npMaterial[2]; + int castleRights, rule50, pliesFromNull; + Score value; + Square epSquare; Key key; Bitboard checkersBB; @@ -163,7 +163,6 @@ public: bool pawn_is_passed(Color c, Square s) const; // Doing and undoing moves - void do_setup_move(Move m, StateInfo& st); void do_move(Move m, StateInfo& st); void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck); void undo_move(Move m); @@ -189,7 +188,7 @@ public: bool is_mate() const; template bool is_draw() const; - // Number of plies from starting position + // Plies from start position to the beginning of search int startpos_ply_counter() const; // Other properties of the position @@ -256,8 +255,8 @@ private: Square castleRookSquare[16]; // [castleRight] StateInfo startState; int64_t nodes; + int startPosPly; Color sideToMove; - int fullMoves; int threadID; StateInfo* st; int chess960; @@ -424,7 +423,7 @@ inline bool Position::move_is_passed_pawn_push(Move m) const { } inline int Position::startpos_ply_counter() const { - return Max(2 * (fullMoves - 1), 0) + int(sideToMove == BLACK); + return startPosPly + st->pliesFromNull; // HACK } inline bool Position::opposite_colored_bishops() const {