X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=solo.c;h=631d335622b87231e22c05b6d2bddba50b756d03;hb=3234912f921916a1b8da164fd61dc75579358577;hp=789d68fd86afeeb0bcbc1fb6e04d6a34d6328de8;hpb=078d3c0a6d6ace0f524dea0c3e03d5fa9ba361c0;p=sgt-puzzles.git diff --git a/solo.c b/solo.c index 789d68f..631d335 100644 --- 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 */ }