From 844915a8280a8733cbd9aa04274aa81e57af6c5b Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 17 Jan 2017 23:57:33 +0000 Subject: [PATCH] _fix-pearl-min-dimensions 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. Gbp-Pq: Name 102_fix-pearl-min-dimensions.diff --- pearl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pearl.c b/pearl.c index 4e4290e..748679d 100644 --- a/pearl.c +++ b/pearl.c @@ -279,6 +279,8 @@ static char *validate_params(const game_params *params, int 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; } -- 2.30.2