aboutsummaryrefslogtreecommitdiff
path: root/pattern.c
diff options
context:
space:
mode:
Diffstat (limited to 'pattern.c')
-rw-r--r--pattern.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pattern.c b/pattern.c
index b9a3d6e..df720b7 100644
--- a/pattern.c
+++ b/pattern.c
@@ -176,6 +176,8 @@ static const char *validate_params(const game_params *params, bool full)
{
if (params->w <= 0 || params->h <= 0)
return "Width and height must both be greater than zero";
+ if (params->w * params->w < 2)
+ return "Grid must contain at least two squares";
return NULL;
}