void sudoku::print(void)
{
- int x,y;
+ int x, y;
printf("+-------+------+--------+\n");
for (y = 0; y < 9; y++) {
}
}
+void sudoku::print_compact(void)
+{
+ int x, y, i = 0;
+ char str[82];
+ str[81] = 0;
+
+ for (y = 0; y < 9; y++)
+ for (x = 0; x < 9; x++, i++)
+ str[i] = table[x][y] != EMPTY ? table[x][y] : '.';
+
+ printf("%s\n", str);
+}
+
void sudoku::clone_to(sudoku &to)
{
sudoku clone;
done = 1;
#pragma omp flush(done)
} else {
- printf("%2d, got only %3d guesses\n", depth,
+ printf("%2d, got only %3d guesses ", depth,
tmp.guesses);
+ tmp.print_compact();
}
if (!done) {
~sudoku();
void print(void);
+ void print_compact(void);
int set(const int col, const int row, const char num);
char get(const int col, const int row);