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

void Puzzle::reset ( bool  clear_marks  )  [virtual]

Reset the puzzle (either with or without marks).

Definition at line 81 of file puzzle.cpp.

References compute_numbers(), Sudoku::Numbers::get(), Sudoku::SDIM, and Sudoku::Numbers::set().

  unsigned int i;

  // Fill the puzzle with the givens.
  for (i = 0; i < SDIM; ++i)
    Numbers::set(i, givens.get(i));

  // Compute possible numbers for all cells.
  for (i = 0; i < SDIM; ++i)

  // Reset marked cells.
  if (clear_marks)
    for (i = 0; i < SDIM; ++i)
      marks[i] = false;

Generated by  Doxygen 1.6.0   Back to index