X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/fa3abef5abe95dd9668a87b1cc57a724dcbf6354..370cbbac43638ae4e2148c4d637ba08d83c966b6:/unfinished/pearl.c diff --git a/unfinished/pearl.c b/unfinished/pearl.c index 41ab998..51b2ed2 100644 --- a/unfinished/pearl.c +++ b/unfinished/pearl.c @@ -217,6 +217,7 @@ int pearl_solve(int w, int h, char *clues, char *result) * Now repeatedly try to find something we can do. */ while (1) { + int done_something = FALSE; #ifdef SOLVER_DIAGNOSTICS for (y = 0; y < H; y++) { @@ -226,8 +227,6 @@ int pearl_solve(int w, int h, char *clues, char *result) } #endif - int done_something = FALSE; - /* * Go through the square state words, and discard any * square state which is inconsistent with known facts @@ -267,9 +266,9 @@ int pearl_solve(int w, int h, char *clues, char *result) if (!workspace[(2*y+1)*W+(2*x+1)]) { #ifdef SOLVER_DIAGNOSTICS printf("edge check at (%d,%d): inconsistency\n", x, y); +#endif ret = 0; goto cleanup; -#endif } } @@ -298,9 +297,9 @@ int pearl_solve(int w, int h, char *clues, char *result) if (edgeand & ~edgeor) { #ifdef SOLVER_DIAGNOSTICS printf("square check at (%d,%d): inconsistency\n", x, y); +#endif ret = 0; goto cleanup; -#endif } for (d = 1; d <= 8; d += d) { @@ -385,7 +384,6 @@ int pearl_solve(int w, int h, char *clues, char *result) } } - break; case STRAIGHT: /* @@ -1351,6 +1349,11 @@ static float game_flash_length(game_state *oldstate, game_state *newstate, return 0.0F; } +static int game_status(game_state *state) +{ + return 0; +} + static int game_timing_state(game_state *state, game_ui *ui) { return TRUE; @@ -1399,6 +1402,7 @@ const struct game thegame = { game_redraw, game_anim_length, game_flash_length, + game_status, FALSE, FALSE, game_print_size, game_print, FALSE, /* wants_statusbar */ FALSE, game_timing_state,