Sudoku::SetMove Class Reference

#include <history.h>

Inheritance diagram for Sudoku::SetMove:
Inheritance graph
[legend]
Collaboration diagram for Sudoku::SetMove:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SetMove (PuzzleGame &puzzle, unsigned int number)
 Constructor.
void execute ()
 Do the move.
void takeBack ()
 Undo the move.

Private Attributes

PuzzleGamepuzzle
unsigned int pos
unsigned int old_number
unsigned int new_number

Detailed Description

Definition at line 93 of file history.h.


Constructor & Destructor Documentation

SetMove::SetMove ( PuzzleGame puzzle,
unsigned int  number 
)

Constructor.

Definition at line 107 of file history.cpp.

References Sudoku::Numbers::get(), Sudoku::PuzzleGame::get_pos(), new_number, old_number, and pos.


Member Function Documentation

void SetMove::execute (  )  [virtual]

Do the move.

Implements Sudoku::Move.

Definition at line 116 of file history.cpp.

References new_number, pos, puzzle, Sudoku::Puzzle::set(), and Sudoku::PuzzleGame::set_pos().

Referenced by Test_History::test_SetMove().

void SetMove::takeBack (  )  [virtual]

Undo the move.

Implements Sudoku::Move.

Definition at line 123 of file history.cpp.

References old_number, pos, puzzle, Sudoku::Puzzle::set(), and Sudoku::PuzzleGame::set_pos().

Referenced by Test_History::test_SetMove().


Member Data Documentation

unsigned int Sudoku::SetMove::new_number [private]

Definition at line 99 of file history.h.

Referenced by execute(), and SetMove().

unsigned int Sudoku::SetMove::old_number [private]

Definition at line 98 of file history.h.

Referenced by SetMove(), and takeBack().

unsigned int Sudoku::SetMove::pos [private]

Definition at line 97 of file history.h.

Referenced by execute(), SetMove(), and takeBack().

Definition at line 96 of file history.h.

Referenced by execute(), and takeBack().


The documentation for this class was generated from the following files:
Generated on Mon Apr 5 17:01:12 2010 for VDR plugin 'Sudoku' by  doxygen 1.6.3