chiark / gitweb /
Enforce more than one dot in Galaxies puzzles.
authorChris Boyle <chris@boyle.name>
Sat, 26 Sep 2015 17:54:15 +0000 (18:54 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 26 Sep 2015 19:02:02 +0000 (20:02 +0100)
At minimum size (3x3) Galaxies can generate a pre-solved single dot
game.

You have to add and remove a line to get the victory flash which is a
bit weird, so just prevent this.

galaxies.c

index a50efe45ff899215d2827a4b7f1b5c60e302d148..53d6fab2db1bf519229805cdfdca4db102edc21e 100644 (file)
@@ -1301,6 +1301,8 @@ generate:
 
     game_update_dots(state);
 
+    if (state->ndots == 1) goto generate;
+
 #ifdef DEBUGGING
     {
         char *tmp = encode_game(state);