Exemplo n.º 1
0
    void SudokuSimpleOutputter::output(const Sudoku& sudoku)
    {
        std::ostream& os = getStream();

        for (int i = 0; i < Sudoku::NUM_ROWS; ++i) {
            for (int j = 0; j < Sudoku::NUM_COLUMNS; ++j) {
                os << sudoku.getValue(i, j)
                   << (j + 1 < Sudoku::NUM_COLUMNS ? " " : "");
            }
            os << std::endl;
        }
    }
Exemplo n.º 2
0
int getFirstThree(const Sudoku& s)
{
	return 100*s.getValue(0,0) + 10*s.getValue(0,1) + s.getValue(0,2);
}