simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Oct 20 20:08:54 BST 2025
TL;DR:
88e4b45 New specialist backend function, set_public_desc().
790f585 Mines: mark the first click when undoing past it.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2025-10-20 20:08:54
commit 88e4b45dd8ae84237a11e737fb56f7091bd5713b
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=88e4b45dd8ae84237a11e737fb56f7091bd5713b;hp=d928126c9fa73739086e35ccaedb4ac1be684a2e
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Oct 20 19:32:36 2025 +0100
New specialist backend function, set_public_desc().
This is the counterpart of midend_supersede_game_desc(): in the rare
case where a puzzle needs to set separate private and public game
descriptions, this method is used during game reload to allow the
contents of the _public_ description to affect the starting game
state.
I hope this will be even less often used than the rest of the
Mines-specific bodges. But Mines itself _is_ about to use it, in the
next commit.
blackbox.c | 1 +
bridges.c | 1 +
cube.c | 1 +
devel.but | 18 ++++++++++++++++++
dominosa.c | 1 +
fifteen.c | 1 +
filling.c | 1 +
flip.c | 1 +
flood.c | 1 +
galaxies.c | 1 +
guess.c | 1 +
inertia.c | 1 +
keen.c | 1 +
lightup.c | 1 +
loopy.c | 1 +
magnets.c | 1 +
map.c | 1 +
midend.c | 11 +++++++++--
mines.c | 1 +
mosaic.c | 1 +
net.c | 1 +
netslide.c | 1 +
nullgame.c | 1 +
palisade.c | 1 +
pattern.c | 1 +
pearl.c | 1 +
pegs.c | 1 +
puzzles.h | 1 +
range.c | 1 +
rect.c | 1 +
samegame.c | 1 +
signpost.c | 1 +
singles.c | 1 +
sixteen.c | 1 +
slant.c | 1 +
solo.c | 1 +
tents.c | 1 +
towers.c | 1 +
tracks.c | 1 +
twiddle.c | 1 +
undead.c | 1 +
unequal.c | 1 +
unfinished/group.c | 1 +
unfinished/separate.c | 1 +
unfinished/slide.c | 1 +
unfinished/sokoban.c | 1 +
unruly.c | 1 +
untangle.c | 1 +
48 files changed, 73 insertions(+), 2 deletions(-)
commit 790f5851507be5845164d3ae7b32b2f86717fe50
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=790f5851507be5845164d3ae7b32b2f86717fe50;hp=88e4b45dd8ae84237a11e737fb56f7091bd5713b
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Oct 20 20:00:06 2025 +0100
Mines: mark the first click when undoing past it.
One hole in Mines's "you never have to guess" story can occur as a UI
accident, rare but possible: if a user clicks on a blank grid causing
a game to be generated, and then (perhaps absentmindedly) presses Undo
to return to a blank grid, then the mine locations are now fixed, and
clicking somewhere _else_ might kill you, or open a single square,
or (perhaps even more confusing) open a region from which the game
can't be solved.
This commit does not stop the user doing that, but makes it clear when
they did. Now, after the first-click location has been selected and
the mines have been placed, if you undo the first move, the location
of your original first click will be marked with an X. Then if you
click somewhere else and find something confusing has happened, it
will at least be more obvious what's going on.
mines.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 47 insertions(+), 4 deletions(-)
More information about the tartarus-commits
mailing list