When checking a solution, ignore readonly cells and set color of correct
cells. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4683 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
0bacb8e624
commit
29a41762fb
@ -375,6 +375,8 @@ Sudoku::check_game(bool highlight) {
|
|||||||
SudokuCell *cell = grid_cells_[i][j];
|
SudokuCell *cell = grid_cells_[i][j];
|
||||||
int val = cell->value();
|
int val = cell->value();
|
||||||
|
|
||||||
|
if (cell->readonly()) continue;
|
||||||
|
|
||||||
if (!val) empty = true;
|
if (!val) empty = true;
|
||||||
else {
|
else {
|
||||||
for (k = 0; k < 9; k ++)
|
for (k = 0; k < 9; k ++)
|
||||||
@ -388,6 +390,9 @@ Sudoku::check_game(bool highlight) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
correct = false;
|
correct = false;
|
||||||
|
} else if (highlight) {
|
||||||
|
cell->color(FL_LIGHT3);
|
||||||
|
cell->redraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user