#include <history.h>

Public Member Functions | |
| History () | |
| Constructor. | |
| ~History () | |
| Destructor. | |
| void | reset () |
| Reset the history. | |
| Move * | current () |
| Current move in the history. | |
| void | add (Move *move) |
| Add a new move. | |
| void | backward () |
| Set previous move as current. | |
| void | forward () |
| Set next move as current. | |
| bool | movesExecuted () const |
| Are there executed moves in the history? | |
| bool | movesToExecute () const |
| Are there moves to execute in the history? | |
Private Attributes | |
| Moves | history |
| unsigned int | executed |
Definition at line 37 of file history.h.
| History::History | ( | ) |
| History::~History | ( | ) |
| void History::add | ( | Move * | move | ) |
Add a new move.
Definition at line 62 of file history.cpp.
References executed, and history.
Referenced by Sudoku::PuzzleGame::set_with_history(), Test_History::test_HistoryAdd(), and Test_History::test_HistoryNull().
| void History::backward | ( | ) |
Set previous move as current.
Definition at line 78 of file history.cpp.
References executed, and movesExecuted().
Referenced by Sudoku::PuzzleGame::backward(), Test_History::test_HistoryAdd(), and Test_History::test_HistoryEmpty().
| Move * History::current | ( | ) |
Current move in the history.
Definition at line 54 of file history.cpp.
References executed, history, and movesExecuted().
Referenced by Sudoku::PuzzleGame::backward(), Sudoku::PuzzleGame::forward(), Sudoku::PuzzleGame::set_with_history(), Test_History::test_HistoryAdd(), and Test_History::test_HistoryNull().
| void History::forward | ( | ) |
Set next move as current.
Definition at line 85 of file history.cpp.
References executed, and movesToExecute().
Referenced by Sudoku::PuzzleGame::forward(), Test_History::test_HistoryAdd(), and Test_History::test_HistoryEmpty().
| bool History::movesExecuted | ( | ) | const |
Are there executed moves in the history?
Definition at line 92 of file history.cpp.
References executed.
Referenced by Sudoku::PuzzleGame::backward(), backward(), current(), Test_History::test_HistoryAdd(), Test_History::test_HistoryEmpty(), and Test_History::test_HistoryNull().
| bool History::movesToExecute | ( | ) | const |
Are there moves to execute in the history?
Definition at line 98 of file history.cpp.
References executed, and history.
Referenced by Sudoku::PuzzleGame::forward(), forward(), Test_History::test_HistoryAdd(), Test_History::test_HistoryEmpty(), and Test_History::test_HistoryNull().
| void History::reset | ( | ) |
Reset the history.
Definition at line 42 of file history.cpp.
References executed, and history.
Referenced by Sudoku::PuzzleGame::reset(), Test_History::test_HistoryEmpty(), and ~History().
unsigned int Sudoku::History::executed [private] |
Definition at line 41 of file history.h.
Referenced by add(), backward(), current(), forward(), History(), movesExecuted(), movesToExecute(), and reset().
Moves Sudoku::History::history [private] |
1.6.3