shithub: puzzles

Download patch

ref: 11c1447eac7698f01c2a00764c2b1a900a9d6a90
parent: f967bfa87b6ea08434501558e0c41184fdce333d
author: Michael Quevillon <mquevill@nd.edu>
date: Sun Apr 3 09:02:30 EDT 2022

Solo: Set max difficulty for small jigsaw puzzles

(cherry picked from Android port, commit
5c9a7b64a06d07f97a41622c4b91d81f3419a51b)

--- a/solo.c
+++ b/solo.c
@@ -3654,10 +3654,11 @@
      * the puzzle size: all 2x2 puzzles appear to be Trivial
      * (DIFF_BLOCK) so we cannot hold out for even a Basic
      * (DIFF_SIMPLE) one.
+     * Jigsaw puzzles of size 2 and 3 are also all trivial.
      */
     dlev.maxdiff = params->diff;
     dlev.maxkdiff = params->kdiff;
-    if (c == 2 && r == 2)
+    if ((c == 2 && r == 2) || (r == 1 && c < 4))
         dlev.maxdiff = DIFF_BLOCK;
 
     grid = snewn(area, digit);