X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=23d3094fed32630772405ceeeab4404f5095782c;hp=91b341ad0ec428469415b424be6b67cce0d181d7;hb=62cd133b3a0697d7960943bb24704c3120506b71;hpb=be5b32bb9cbf134ccf8df7c17554557e9828957d diff --git a/src/position.h b/src/position.h index 91b341ad..23d3094f 100644 --- a/src/position.h +++ b/src/position.h @@ -47,6 +47,8 @@ const int MaxGameLength = 220; //// Types //// +class Position; + /// struct checkInfo is initialized at c'tor time and keeps /// info used to detect if a move gives check. @@ -220,7 +222,7 @@ public: bool square_is_weak(Square s, Color c) const; // Doing and undoing moves - void detach(); + void do_setup_move(Move m); void do_move(Move m, StateInfo& st); void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck); void undo_move(Move m); @@ -250,9 +252,7 @@ public: // Check if side to move could be mated in one bool has_mate_threat(); - // Number of plies since the last non-reversible move - int rule_50_counter() const; - + // Number of plies from starting position int startpos_ply_counter() const; // Other properties of the position @@ -263,9 +263,6 @@ public: // Current thread ID searching on the position int thread() const; - // Reset the gamePly variable to 0 - void reset_game_ply(); - void inc_startpos_ply_counter(); int64_t nodes_searched() const; void set_nodes_searched(int64_t n); @@ -280,6 +277,7 @@ private: // Initialization helper functions (used while setting up a position) void clear(); + void detach(); void put_piece(Piece p, Square s); void do_allow_oo(Color c); void do_allow_ooo(Color c); @@ -534,10 +532,6 @@ inline bool Position::move_is_passed_pawn_push(Move m) const { && pawn_is_passed(c, move_to(m)); } -inline int Position::rule_50_counter() const { - return st->rule50; -} - inline int Position::startpos_ply_counter() const { return startPosPlyCounter; }