From d81def4fa90e69590feee55c95ef874a0d459bcd Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 31 May 2010 12:05:04 +0200 Subject: [PATCH] Add function to get ply from position It will be used by future patches. No functional change. Signed-off-by: Marco Costalba --- src/position.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/position.h b/src/position.h index 766a8451..ff1fa937 100644 --- a/src/position.h +++ b/src/position.h @@ -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) -- 2.39.2