X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=0bb7b0b99ada88507cecd6f6f0518031c4e5c7a5;hp=85ea6a7a8020311046c04fe7b15a1d5faf158ebc;hb=60c121f3b1ee7d5ced3435cc1718e4e6e6fd8383;hpb=3c07603dac03f0da20194097cf4eb1a396fea60d diff --git a/src/position.h b/src/position.h index 85ea6a7a..0bb7b0b9 100644 --- a/src/position.h +++ b/src/position.h @@ -82,12 +82,11 @@ class Position { friend std::ostream& operator<<(std::ostream&, const Position&); - Position(const Position&); // Disable the default copy constructor - public: static void init(); - Position() {} // To define the global object RootPos + Position() = default; // To define the global object RootPos + Position(const Position&) = delete; Position(const Position& pos, Thread* th) { *this = pos; thisThread = th; } Position(const std::string& f, bool c960, Thread* th) { set(f, c960, th); } Position& operator=(const Position&); // To assign RootPos from UCI @@ -170,6 +169,7 @@ public: uint64_t nodes_searched() const; void set_nodes_searched(uint64_t n); bool is_draw() const; + int rule50_count() const; Score psq_score() const; Value non_pawn_material(Color c) const; @@ -347,6 +347,10 @@ inline int Position::game_ply() const { return gamePly; } +inline int Position::rule50_count() const { + return st->rule50; +} + inline uint64_t Position::nodes_searched() const { return nodes; }