diff options
Diffstat (limited to 'history.cpp')
-rw-r--r-- | history.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/history.cpp b/history.cpp index 65e3a5f..56cf6c0 100644 --- a/history.cpp +++ b/history.cpp @@ -58,7 +58,7 @@ Move* History::current() return 0; } -/** Add a new move */ +/** Add a new move. */ void History::add(Move* move) { if (move) @@ -74,28 +74,28 @@ void History::add(Move* move) } } -/** Set previous move as current */ +/** Set previous move as current. */ void History::backward() { if (movesExecuted()) --executed; } -/** Set next move as current */ +/** Set next move as current. */ void History::forward() { if (movesToExecute()) ++executed; } -/** Are there executed moves in the history */ -bool History::movesExecuted() +/** Are there executed moves in the history? */ +bool History::movesExecuted() const { return executed > 0; } -/** Are there moves to execute in the history */ -bool History::movesToExecute() +/** Are there moves to execute in the history? */ +bool History::movesToExecute() const { return executed < history.size(); } |