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:
Michael R Sweet 2005-12-04 01:43:22 +00:00
parent 0bacb8e624
commit 29a41762fb

View File

@ -375,6 +375,8 @@ Sudoku::check_game(bool highlight) {
SudokuCell *cell = grid_cells_[i][j];
int val = cell->value();
if (cell->readonly()) continue;
if (!val) empty = true;
else {
for (k = 0; k < 9; k ++)
@ -388,6 +390,9 @@ Sudoku::check_game(bool highlight) {
}
correct = false;
} else if (highlight) {
cell->color(FL_LIGHT3);
cell->redraw();
}
}
}