Introduce a new game backend function (there seem to have been a lot
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 6 Jun 2005 11:21:36 +0000 (11:21 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 6 Jun 2005 11:21:36 +0000 (11:21 +0000)
commit07dfb697bb30781c963b11eb00c4951bb5db6a7d
tree6d6dfa8255a2d7a2b5a3529bb3b9a4b0f6101e66
parent39c86385a35e8ae4c2eb5487464787d6fb15a782
Introduce a new game backend function (there seem to have been a lot
of these recently) whose job is to update a game_ui to be consistent
with a new game_state. This is called by midend.c in every situation
where the current game_state changes _other_ than as a result of
make_move (Undo, Redo, Restart, Solve).

The introduction of this function allows a game_ui to contain
information about selections or highlights within a game_state which
simply wouldn't make sense when transferred to another game_state.
In particular, I've used it to fix a subtle bug in Solo whereby,
although you couldn't right-click to pencil-mode highlight a filled
square, you could _get_ a pencil-mode highlight in a filled square
if you used Undo and Redo. (Undo to before the square was filled,
right-click to highlight it, then Redo. Alternatively, left-click
and clear the square, right-click to highlight it, then Undo.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5912 cda61777-01e9-0310-a592-d414129be87e
13 files changed:
cube.c
fifteen.c
midend.c
mines.c
net.c
netslide.c
nullgame.c
pattern.c
puzzles.h
rect.c
sixteen.c
solo.c
twiddle.c