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 {
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;
}
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 ";
#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
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
} else if (n == '_') {
/* do nothing */;
} else if (n > '0' && n <= '9') {
+ int val = atoi(desc-1);
+ if (val < 1 || val > params->c * params->r)
+ return "Out-of-range number in game description";
squares++;
while (*desc >= '0' && *desc <= '9')
desc++;
ds->tilesize = tilesize;
}
-static float *game_colours(frontend *fe, game_state *state, int *ncolours)
+static float *game_colours(frontend *fe, int *ncolours)
{
float *ret = snewn(3 * NCOLOURS, float);
return 0.0F;
}
-static int game_wants_statusbar(void)
-{
- return FALSE;
-}
-
static int game_timing_state(game_state *state, game_ui *ui)
{
return TRUE;
/* Ick: fake up `ds->tilesize' for macro expansion purposes */
game_drawstate ads, *ds = &ads;
- ads.tilesize = tilesize;
+ game_set_size(dr, ds, NULL, tilesize);
/*
* Border.
#endif
const struct game thegame = {
- "Solo", "games.solo",
+ "Solo", "games.solo", "solo",
default_params,
game_fetch_preset,
decode_params,
game_anim_length,
game_flash_length,
TRUE, FALSE, game_print_size, game_print,
- game_wants_statusbar,
+ FALSE, /* wants_statusbar */
FALSE, game_timing_state,
- 0, /* mouse_priorities */
+ REQUIRE_RBUTTON | REQUIRE_NUMPAD, /* flags */
};
#ifdef STANDALONE_SOLVER