X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/ac9f41c4c8ccbf9364a5d351e4cb134812a9926b..be39fd6df763fafcc07131d46fa4a3bd59245b64:/solo.c diff --git a/solo.c b/solo.c index 923113a..bba2cbd 100644 --- a/solo.c +++ b/solo.c @@ -207,7 +207,7 @@ static void decode_params(game_params *ret, char const *string) if (*string == 'r' || *string == 'm' || *string == 'a') { int sn, sc, sd; sc = *string++; - if (*string == 'd') { + if (sc == 'm' && *string == 'd') { sd = TRUE; string++; } else { @@ -331,8 +331,8 @@ static char *validate_params(game_params *params, int full) return "Both dimensions must be at least 2"; if (params->c > ORDER_MAX || params->r > ORDER_MAX) return "Dimensions greater than "STR(ORDER_MAX)" are not supported"; - if ((params->c * params->r) > 36) - return "Unable to support more than 36 distinct symbols in a puzzle"; + if ((params->c * params->r) > 35) + return "Unable to support more than 35 distinct symbols in a puzzle"; return NULL; } @@ -1629,7 +1629,7 @@ static int solver(int c, int r, digit *grid, int maxdiff) if (solver_show_working) { char *sep = ""; printf("%*srecursing on (%d,%d) [", - solver_recurse_depth*4, "", x, y); + solver_recurse_depth*4, "", x + 1, y + 1); for (i = 0; i < j; i++) { printf("%s%d", sep, list[i]); sep = " or "; @@ -1651,7 +1651,7 @@ static int solver(int c, int r, digit *grid, int maxdiff) #ifdef STANDALONE_SOLVER if (solver_show_working) printf("%*sguessing %d at (%d,%d)\n", - solver_recurse_depth*4, "", list[i], x, y); + solver_recurse_depth*4, "", list[i], x + 1, y + 1); solver_recurse_depth++; #endif @@ -1661,7 +1661,7 @@ static int solver(int c, int r, digit *grid, int maxdiff) solver_recurse_depth--; if (solver_show_working) { printf("%*sretracting %d at (%d,%d)\n", - solver_recurse_depth*4, "", list[i], x, y); + solver_recurse_depth*4, "", list[i], x + 1, y + 1); } #endif @@ -3052,7 +3052,7 @@ static void game_print(drawing *dr, game_state *state, int tilesize) #endif const struct game thegame = { - "Solo", "games.solo", + "Solo", "games.solo", "solo", default_params, game_fetch_preset, decode_params, @@ -3085,7 +3085,7 @@ const struct game thegame = { TRUE, FALSE, game_print_size, game_print, FALSE, /* wants_statusbar */ FALSE, game_timing_state, - 0, /* flags */ + REQUIRE_RBUTTON | REQUIRE_NUMPAD, /* flags */ }; #ifdef STANDALONE_SOLVER