chiark / gitweb /
Tents: mark squares as non-tents with {Shift,Control}-cursor keys.
[sgt-puzzles.git] / solo.c
diff --git a/solo.c b/solo.c
index 789d68fd86afeeb0bcbc1fb6e04d6a34d6328de8..631d335622b87231e22c05b6d2bddba50b756d03 100644 (file)
--- a/solo.c
+++ b/solo.c
@@ -4614,6 +4614,9 @@ static char *interpret_move(const game_state *state, game_ui *ui,
        return dupstr(buf);
     }
 
+    if (button == 'M' || button == 'm')
+        return dupstr("M");
+
     return NULL;
 }
 
@@ -4665,6 +4668,21 @@ static game_state *execute_move(const game_state *from, const char *move)
             }
         }
        return ret;
+    } else if (move[0] == 'M') {
+       /*
+        * Fill in absolutely all pencil marks in unfilled squares,
+        * for those who like to play by the rigorous approach of
+        * starting off in that state and eliminating things.
+        */
+       ret = dup_game(from);
+        for (y = 0; y < cr; y++) {
+            for (x = 0; x < cr; x++) {
+                if (!ret->grid[y*cr+x]) {
+                    memset(ret->pencil + (y*cr+x)*cr, 1, cr);
+                }
+            }
+        }
+       return ret;
     } else
        return NULL;                   /* couldn't parse move string */
 }