Logo Search packages:      
Sourcecode: vdr-plugin-sudoku version File versions  Download package

unsigned int Puzzle::next_number ( Pos  pos  ) 

Get the next possible number for this cell.

Definition at line 215 of file puzzle.cpp.

References Sudoku::DIM, and given().

Referenced by Sudoku::Solver::is_last_at(), SudokuPlugin::Menu::ProcessKey(), Sudoku::Solver::set_first_at(), and Sudoku::Solver::set_next_at().

  assert (pos <= Pos::last());
  unsigned int n = get(pos);
  unsigned int i;

  if (!given(pos))
    for (n = (n+1)%(DIM+1), i = 0; i < DIM+1; ++i, n = (n+1)%(DIM+1))
      if (numbers[pos][n])

  return n;

Generated by  Doxygen 1.6.0   Back to index