chiark / gitweb /
Fix a misrendering in Guess.
[sgt-puzzles.git] / undead.c
index fe5954f2a8ea0ea554aac26539cbdd1ee03aae28..fc03fe8f1701d182fec0477b554cf17f23861b7e 100644 (file)
--- a/undead.c
+++ b/undead.c
@@ -1727,6 +1727,10 @@ static char *interpret_move(const game_state *state, game_ui *ui,
         ui->ascii = !ui->ascii;
         return "";      
     }
+
+    if (button == 'm' || button == 'M') {
+        return dupstr("M");
+    }
     
     if (ui->hshow == 1 && ui->hpencil == 0) {
         xi = state->common->xinfo[ui->hx + ui->hy*(state->common->params.w+2)];
@@ -2020,6 +2024,18 @@ static game_state *execute_move(const game_state *state, const char *move)
             ret->hints_done[clue_index(ret, x, y)] ^= 1;
             move += n + 1;
         }
+        if (c == '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.
+             */
+            for (i = 0; i < ret->common->wh; i++)
+                if (ret->guess[i] == 7)
+                    ret->pencils[i] = 7;
+            move++;
+        }
         if (*move == ';') move++;
     }