]> git.sesse.net Git - stockfish/blobdiff - src/position.h
Account for gamePly after each move
[stockfish] / src / position.h
index 579b5308a82e6bea721cdec7ff5233a6a7b6ae93..fb7eb4b90cc79335ade326bcbeae0d59825c1fe6 100644 (file)
@@ -174,7 +174,7 @@ public:
 
   // Other properties of the position
   Color side_to_move() const;
-  int startpos_ply_counter() const;
+  int game_ply() const;
   bool is_chess960() const;
   Thread* this_thread() const;
   int64_t nodes_searched() const;
@@ -218,7 +218,7 @@ private:
   Bitboard castlePath[COLOR_NB][CASTLING_SIDE_NB];
   StateInfo startState;
   int64_t nodes;
-  int startPosPly;
+  int gamePly;
   Color sideToMove;
   Thread* thisThread;
   StateInfo* st;
@@ -376,8 +376,8 @@ inline bool Position::is_passed_pawn_push(Move m) const {
         && pawn_is_passed(sideToMove, to_sq(m));
 }
 
-inline int Position::startpos_ply_counter() const {
-  return startPosPly + st->pliesFromNull; // HACK
+inline int Position::game_ply() const {
+  return gamePly;
 }
 
 inline bool Position::opposite_bishops() const {