shithub: puzzles

Download patch

ref: a7f19c87a9d926cdb8a090d96bda4a6f853bfe18
parent: cb57de3e44a68a642ba088c980345e0e6e42a9df
author: Simon Tatham <[email protected]>
date: Mon Jan 15 18:30:44 EST 2007

Phil Bordelon points out an off-by-one error: since Solo doesn't use
zero as a valid puzzle symbol, it can support at most 35 symbols,
not 36. (This is largely academic since IME anything above about 25
is impractical to generate, but there we go.)

[originally from svn r7115]

--- a/solo.c
+++ b/solo.c
@@ -331,8 +331,8 @@
 	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";
+    if ((params->c * params->r) > 35)
+        return "Unable to support more than 35 distinct symbols in a puzzle";
     return NULL;
 }