mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 16:32:13 -07:00
Pearl: Require width or height to be at least 6 for Tricky
Josh Triplett reported: > If I ask pearl to generate a 5x5 tricky puzzle, it runs forever. I find that 5x6 or 6x5 works, so set the minimum accordingly. References: https://bugs.debian.org/667963
This commit is contained in:

committed by
Simon Tatham

parent
387d323dd8
commit
49dbf1f60d
2
pearl.c
2
pearl.c
@ -274,6 +274,8 @@ static const char *validate_params(const game_params *params, bool full)
|
||||
if (params->h < 5) return "Height must be at least five";
|
||||
if (params->difficulty < 0 || params->difficulty >= DIFFCOUNT)
|
||||
return "Unknown difficulty level";
|
||||
if (params->difficulty >= DIFF_TRICKY && params->w + params->h < 11)
|
||||
return "Width or height must be at least six for Tricky";
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user