From 437ed08c81301b09724de17fd8ec51a584393a7f Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 12 Sep 2005 17:09:29 +0000 Subject: [PATCH] I am again gormless! When I overhauled Solo's grid generator in r6160, I completely failed to ensure that generated grids were _at most_ the required difficulty. It appears to have been only random chance that prevented a request for a Trivial puzzle from producing Extreme. Here's a one-line fix. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6298 cda61777-01e9-0310-a592-d414129be87e --- solo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solo.c b/solo.c index efd795b..05774a4 100644 --- a/solo.c +++ b/solo.c @@ -2220,7 +2220,7 @@ static char *new_game_desc(game_params *params, random_state *rs, grid2[coords[2*j+1]*cr+coords[2*j]] = 0; ret = solver(c, r, grid2, maxdiff); - if (ret != DIFF_IMPOSSIBLE && ret != DIFF_AMBIGUOUS) { + if (ret <= maxdiff) { for (j = 0; j < ncoords; j++) grid[coords[2*j+1]*cr+coords[2*j]] = 0; } -- 2.11.0