Skip to content
This repository was archived by the owner on May 21, 2022. It is now read-only.

Commit 432653a

Browse files
committed
Added board function to return move count (how far into the game are we?)
1 parent 5d3b236 commit 432653a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

board.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ class Board
245245
return ret;
246246
}
247247

248+
int32_t GetHalfMoveCount() const
249+
{
250+
return static_cast<int32_t>(m_undoStackBB.GetSize());
251+
}
252+
248253
private:
249254
template <MOVE_TYPES MT> void GenerateAllPseudoLegalMoves_(MoveList &moveList) const;
250255
template <MOVE_TYPES MT> void GenerateKingMoves_(Color color, MoveList &moveList) const;

0 commit comments

Comments
 (0)