]> git.sesse.net Git - stockfish/commitdiff
Add function to get ply from position
authorMarco Costalba <mcostalba@gmail.com>
Mon, 31 May 2010 10:05:04 +0000 (12:05 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 31 May 2010 11:10:39 +0000 (12:10 +0100)
It will be used by future patches.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/position.h

index 766a84518c3f5a1f3bac447a119cd4788f1a0d8d..ff1fa9370d9cbf36460cca42e84849e0e397fe47 100644 (file)
@@ -271,7 +271,8 @@ public:
   bool opposite_colored_bishops() const;
   bool has_pawn_on_7th(Color c) const;
 
-  // Reset the gamePly variable to 0
+  // Game ply information
+  int ply() const;
   void reset_game_ply();
 
   // Position consistency check, for debugging
@@ -556,4 +557,8 @@ inline PieceType Position::captured_piece() const {
   return st->capture;
 }
 
+inline int Position::ply() const {
+  return st->gamePly;
+}
+
 #endif // !defined(POSITION_H_INCLUDED)