diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2008-02-26 20:37:01 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2008-02-26 20:37:01 +0000 |
| commit | a87355980e65ce1ca765d0d7f994ab7532e11aa8 (patch) | |
| tree | 89ff9d8aedddca69f3d0e8cb84db83c145030c57 /test | |
| parent | 9c538a4b2e4b349785b77e774a1011380d8b46cb (diff) | |
STR 1885: fixed silly bugs in Sudoku
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6053 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/sudoku.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sudoku.cxx b/test/sudoku.cxx index d5edb05c5..df2a6a2b3 100644 --- a/test/sudoku.cxx +++ b/test/sudoku.cxx @@ -141,7 +141,7 @@ class SudokuSound { class SudokuCell : public Fl_Widget { bool readonly_; int value_; - int test_value_[8]; + int test_value_[9]; public: @@ -915,14 +915,14 @@ Sudoku::update_helpers() { int co = (col / 3) * 3; for (k = 0; k < 3; k ++) { for (m = 0; m < 3; m ++) { - SudokuCell *cell = grid_cells_[ro + j][co + k]; + SudokuCell *cell = grid_cells_[ro + k][co + m]; int v = cell->value(); if (v) taken[v] = 1; } } // transfer our findings to the markers for (m = 1, k = 0; m <= 9; m ++) { - if (!taken[k]) + if (!taken[m]) dst_cell->test_value(m, k ++); } } |
