#include <puzzle.h>
Public Member Functions | |
Pos (unsigned int col, unsigned int row) | |
Pos (unsigned int pos=0) | |
operator unsigned int () const | |
Pos | next () const |
unsigned int | col () const |
unsigned int | row () const |
unsigned int | reg () const |
Pos | symmetric () const |
Pos | prev_col () const |
Pos | next_col () const |
Pos | prev_row () const |
Pos | next_row () const |
bool | interacts_with (Pos other) const |
Static Public Member Functions | |
static Pos | first () |
static Pos | last () |
static Pos | center () |
Private Attributes | |
unsigned int | pos |
Position in a Sudoku.
Definition at line 55 of file puzzle.h.
Sudoku::Pos::Pos | ( | unsigned int | col, | |
unsigned int | row | |||
) | [inline] |
static Pos Sudoku::Pos::center | ( | ) | [inline, static] |
Definition at line 68 of file puzzle.h.
References Sudoku::SDIM.
Referenced by Sudoku::Generator::is_valid_at().
unsigned int Sudoku::Pos::col | ( | ) | const [inline] |
Definition at line 65 of file puzzle.h.
References Sudoku::DIM, and pos.
Referenced by interacts_with(), next_col(), SudokuPlugin::Menu::paint(), prev_col(), reg(), and Test_Puzzle::test_Pos().
static Pos Sudoku::Pos::first | ( | ) | [inline, static] |
Definition at line 62 of file puzzle.h.
Referenced by Sudoku::Puzzle::compute_numbers(), Sudoku::Puzzle::set(), and Sudoku::Solver::Solver().
bool Sudoku::Pos::interacts_with | ( | Pos | other | ) | const [inline] |
static Pos Sudoku::Pos::last | ( | ) | [inline, static] |
Definition at line 63 of file puzzle.h.
References Sudoku::SDIM.
Referenced by Sudoku::Puzzle::ambiguous(), Sudoku::Puzzle::compute_numbers(), Sudoku::Puzzle::correct(), Sudoku::Puzzle::error(), Sudoku::Numbers::get(), Sudoku::Puzzle::given(), Sudoku::Puzzle::marked(), Sudoku::Puzzle::next_number(), Sudoku::Puzzle::numbers_count(), Sudoku::Puzzle::possible_number(), Sudoku::Puzzle::set(), Sudoku::Numbers::set(), Sudoku::Solver::set_first_at(), Sudoku::Solver::Solver(), and Sudoku::Puzzle::toggle_mark().
Pos Sudoku::Pos::next | ( | ) | const [inline] |
Pos Sudoku::Pos::next_col | ( | ) | const [inline] |
Definition at line 71 of file puzzle.h.
References col(), Sudoku::DIM, and pos.
Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().
Pos Sudoku::Pos::next_row | ( | ) | const [inline] |
Definition at line 73 of file puzzle.h.
References Sudoku::DIM, pos, and row().
Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().
Sudoku::Pos::operator unsigned int | ( | ) | const [inline] |
Pos Sudoku::Pos::prev_col | ( | ) | const [inline] |
Definition at line 70 of file puzzle.h.
Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().
Pos Sudoku::Pos::prev_row | ( | ) | const [inline] |
Definition at line 72 of file puzzle.h.
References Sudoku::DIM, pos, and row().
Referenced by SudokuPlugin::Menu::ProcessKey(), and Test_Puzzle::test_Pos().
unsigned int Sudoku::Pos::reg | ( | ) | const [inline] |
Definition at line 67 of file puzzle.h.
References col(), Sudoku::RDIM, and row().
Referenced by interacts_with(), and Test_Puzzle::test_Pos().
unsigned int Sudoku::Pos::row | ( | ) | const [inline] |
Definition at line 66 of file puzzle.h.
References Sudoku::DIM, and pos.
Referenced by interacts_with(), next_row(), SudokuPlugin::Menu::paint(), prev_row(), reg(), and Test_Puzzle::test_Pos().
Pos Sudoku::Pos::symmetric | ( | ) | const [inline] |
Definition at line 69 of file puzzle.h.
References pos, and Sudoku::SDIM.
Referenced by Sudoku::Generator::is_valid_at(), and Test_Puzzle::test_Pos().
unsigned int Sudoku::Pos::pos [private] |
Definition at line 57 of file puzzle.h.
Referenced by col(), interacts_with(), next(), next_col(), next_row(), operator unsigned int(), prev_col(), prev_row(), row(), and symmetric().