Sanity-checking patch from Phil Bordelon: since Solo can't cope with
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 16 Jul 2005 20:02:15 +0000 (20:02 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 16 Jul 2005 20:02:15 +0000 (20:02 +0000)
more than 36 distinct symbols (it runs out of alphanumerics), check
this in validate_params. I hate to do this, since I like puzzle
sizes to at least be open-ended in _principle_, but in this case
there's a fundamental UI limitation which won't be fixed by getting
a faster CPU.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6098 cda61777-01e9-0310-a592-d414129be87e

solo.c

diff --git a/solo.c b/solo.c
index e598fc0..f8d8d6b 100644 (file)
--- a/solo.c
+++ b/solo.c
@@ -327,6 +327,8 @@ static char *validate_params(game_params *params, int full)
        return "Both dimensions must be at least 2";
     if (params->c > ORDER_MAX || params->r > ORDER_MAX)
        return "Dimensions greater than "STR(ORDER_MAX)" are not supported";
+    if ((params->c * params->r) > 36)
+        return "Unable to support more than 36 distinct symbols in a puzzle";
     return NULL;
 }