X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/7959b51735be301d234b41ac2f3b88bdcc34a34a..08781119281c4c144ba167e87476429b0aae20b4:/mines.c diff --git a/mines.c b/mines.c index e6c65ea..db98cc9 100644 --- a/mines.c +++ b/mines.c @@ -232,6 +232,8 @@ static game_params *custom_params(config_item *cfg) ret->w = atoi(cfg[0].sval); ret->h = atoi(cfg[1].sval); ret->n = atoi(cfg[2].sval); + if (strchr(cfg[2].sval, '%')) + ret->n = ret->n * (ret->w * ret->h) / 100; ret->unique = cfg[3].ival; return ret; @@ -1023,7 +1025,7 @@ static int minesolve(int w, int h, int n, char *grid, #ifdef SOLVER_DIAGNOSTICS printf("trying a set combination with %d %d\n", squaresleft, minesleft); -#endif SOLVER_DIAGNOSTICS +#endif /* SOLVER_DIAGNOSTICS */ /* * We've reached the end. See if we've got