diff options
| author | Simon Tatham <anakin@pobox.com> | 2010-01-09 17:21:36 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2010-01-09 17:21:36 +0000 |
| commit | 6776b0afba6b4b3f8efd76a8425831b3d8a59a77 (patch) | |
| tree | 8bc85e22af53450262103849a21b4ab7b524006e | |
| parent | 572a7469373a4e3073043001dc9e61289259316d (diff) | |
| download | puzzles-6776b0afba6b4b3f8efd76a8425831b3d8a59a77.zip puzzles-6776b0afba6b4b3f8efd76a8425831b3d8a59a77.tar.gz puzzles-6776b0afba6b4b3f8efd76a8425831b3d8a59a77.tar.bz2 puzzles-6776b0afba6b4b3f8efd76a8425831b3d8a59a77.tar.xz | |
Oops. Uncomment the difficulty exceptions! (Also add another
constraint in validate_params.)
[originally from svn r8824]
| -rw-r--r-- | unfinished/group.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/unfinished/group.c b/unfinished/group.c index 4987a9e..c82c40a 100644 --- a/unfinished/group.c +++ b/unfinished/group.c @@ -242,6 +242,17 @@ static char *validate_params(game_params *params, int full) */ return "Trivial puzzles must have an identity"; } + if (!params->id && params->w == 3) { + /* + * We can't have a 3x3 puzzle without an identity either, + * because 3x3 puzzles can't ever be harder than Trivial + * (there are no 3x3 latin squares which aren't also valid + * group tables, so enabling group-based deductions doesn't + * rule out any possible solutions) and - as above - Trivial + * puzzles can't not have an identity. + */ + return "3x3 puzzles must have an identity"; + } return NULL; } @@ -602,7 +613,6 @@ done * _out_, so as to detect exceptions that should be removed as * well as those which should be added. */ -#if 0 if (w < 5 && diff == DIFF_UNREASONABLE) diff--; if ((w < 5 || ((w == 6 || w == 8) && params->id)) && diff == DIFF_EXTREME) @@ -611,7 +621,6 @@ done diff--; if ((w < 4 || (w == 4 && params->id)) && diff == DIFF_NORMAL) diff--; -#endif grid = snewn(a, digit); soln = snewn(a, digit); |