Sudoku::PuzzleGame Class Reference

Sudoku puzzle game. More...

#include <puzzle.h>

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

List of all members.

Public Member Functions

 PuzzleGame (const char *dump=0)
 Constructor.
 PuzzleGame (unsigned int givens_count, bool symmetric=true)
 Constructor with generation of a random puzzle.
virtual ~PuzzleGame ()
 Destructor.
virtual void reset ()
 Reset the puzzle (including marks).
virtual void reset (bool clear_marks)
 Reset the puzzle (either with or without marks).
virtual void set_with_history (unsigned int number)
 Set the number into the current cell, write action into history.
Pos get_pos () const
 Get the position of the current cell.
void set_pos (Pos new_pos)
 Set the position of the current cell.
void backward ()
 Go one step backward in the history.
void forward ()
 Go one step forward in the history.

Private Member Functions

 PuzzleGame (const PuzzleGame &other)
PuzzleGameoperator= (const PuzzleGame &other)

Private Attributes

Pos pos
Historyhistory

Detailed Description

Sudoku puzzle game.

Definition at line 215 of file puzzle.h.


Constructor & Destructor Documentation

Sudoku::PuzzleGame::PuzzleGame ( const PuzzleGame other  )  [private]
PuzzleGame::PuzzleGame ( const char *  dump = 0  ) 

Constructor.

Definition at line 389 of file puzzle.cpp.

References history.

PuzzleGame::PuzzleGame ( unsigned int  givens_count,
bool  symmetric = true 
)

Constructor with generation of a random puzzle.

Definition at line 396 of file puzzle.cpp.

References history.

PuzzleGame::~PuzzleGame (  )  [virtual]

Destructor.

Definition at line 403 of file puzzle.cpp.

References history.


Member Function Documentation

void PuzzleGame::backward (  ) 

Go one step backward in the history.

Definition at line 447 of file puzzle.cpp.

References Sudoku::History::backward(), Sudoku::History::current(), history, Sudoku::History::movesExecuted(), and Sudoku::Move::takeBack().

Referenced by SudokuPlugin::Menu::undo().

void PuzzleGame::forward (  ) 

Go one step forward in the history.

Definition at line 457 of file puzzle.cpp.

References Sudoku::History::current(), Sudoku::Move::execute(), Sudoku::History::forward(), history, and Sudoku::History::movesToExecute().

Referenced by SudokuPlugin::Menu::redo().

Pos PuzzleGame::get_pos (  )  const
PuzzleGame& Sudoku::PuzzleGame::operator= ( const PuzzleGame other  )  [private]
void PuzzleGame::reset ( bool  clear_marks  )  [virtual]

Reset the puzzle (either with or without marks).

Reimplemented from Sudoku::Puzzle.

Definition at line 415 of file puzzle.cpp.

References history, Sudoku::History::reset(), and reset().

void PuzzleGame::reset (  )  [virtual]

Reset the puzzle (including marks).

Reimplemented from Sudoku::Puzzle.

Definition at line 409 of file puzzle.cpp.

Referenced by reset(), and SudokuPlugin::Menu::reset().

void PuzzleGame::set_pos ( Pos  new_pos  ) 

Set the position of the current cell.

Definition at line 441 of file puzzle.cpp.

References pos.

Referenced by Sudoku::SetMove::execute(), SudokuPlugin::Menu::next_cell(), SudokuPlugin::Menu::ProcessKey(), and Sudoku::SetMove::takeBack().

void PuzzleGame::set_with_history ( unsigned int  number  )  [virtual]

Set the number into the current cell, write action into history.

Definition at line 423 of file puzzle.cpp.

References Sudoku::History::add(), Sudoku::History::current(), Sudoku::Move::execute(), Sudoku::Puzzle::given(), history, and pos.

Referenced by SudokuPlugin::Menu::next_number(), and SudokuPlugin::Menu::ProcessKey().


Member Data Documentation

Definition at line 218 of file puzzle.h.

Referenced by backward(), forward(), PuzzleGame(), reset(), set_with_history(), and ~PuzzleGame().

Definition at line 217 of file puzzle.h.

Referenced by get_pos(), set_pos(), and set_with_history().


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