summaryrefslogtreecommitdiff
path: root/apps/plugins/sudoku/sudoku.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sudoku/sudoku.c')
-rw-r--r--apps/plugins/sudoku/sudoku.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/apps/plugins/sudoku/sudoku.c b/apps/plugins/sudoku/sudoku.c
index 99b08f21a9..9e7e969eee 100644
--- a/apps/plugins/sudoku/sudoku.c
+++ b/apps/plugins/sudoku/sudoku.c
@@ -283,6 +283,10 @@ static unsigned int cellypos[9]={
283#define YOFS ((LCD_HEIGHT-BOARD_HEIGHT)/2) 283#define YOFS ((LCD_HEIGHT-BOARD_HEIGHT)/2)
284#endif 284#endif
285 285
286#define BLOCK 3
287#define SIZE (BLOCK*BLOCK)
288
289#if 0
286/****** Solver routine by Tom Shackell <shackell@cs.york.ac.uk> 290/****** Solver routine by Tom Shackell <shackell@cs.york.ac.uk>
287 291
288Downloaded from: 292Downloaded from:
@@ -295,9 +299,6 @@ Released under GPLv2
295 299
296typedef unsigned int Bitset; 300typedef unsigned int Bitset;
297 301
298#define BLOCK 3
299#define SIZE (BLOCK*BLOCK)
300
301#define true 1 302#define true 1
302#define false 0 303#define false 0
303 304
@@ -569,6 +570,18 @@ void sudoku_solve(struct sudoku_state_t* state)
569 570
570 return; 571 return;
571} 572}
573#endif /* 0 */
574
575void sudoku_solve(struct sudoku_state_t* state)
576{
577 bool ret = sudoku_solve_board(state);
578
579 if (!ret) {
580 rb->splash(HZ*2, "Solve failed");
581 }
582
583 return;
584}
572 585
573/* Copies the current to the saved board */ 586/* Copies the current to the saved board */
574static void save_state(struct sudoku_state_t *state) 587static void save_state(struct sudoku_state_t *state)