summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-12-04 01:43:22 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-12-04 01:43:22 +0000
commit29a41762fbed2af058abe60fa76c38a01a4542c2 (patch)
treea70a089745c6204fece1af65bcca173907354cb8 /test
parent0bacb8e6249785dbd7892a9e5b66133068ffe506 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/sudoku.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/sudoku.cxx b/test/sudoku.cxx
index 97e17de75..3bc45e687 100644
--- a/test/sudoku.cxx
+++ b/test/sudoku.cxx
@@ -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();
}
}
}