chiark / gitweb /
`Restart' is now an undo-able action: it appends a move to the end
authorSimon Tatham <anakin@pobox.com>
Tue, 17 May 2005 11:46:55 +0000 (11:46 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 17 May 2005 11:46:55 +0000 (11:46 +0000)
commitc9f05ca3c0abf3b25b1a00caca72630ba6eb017e
tree3907ec423f1026ca5a30c8697633676e30368ce9
parent0913f94a98373ce2c68c5bc159cc2684b1955211
`Restart' is now an undo-able action: it appends a move to the end
of the undo list rather than destroying it. Partly this is because
accidental restarts are a real pain, and partly because it allows
you to compare the initial to the current state by restart-then-undo
which is handy in some puzzles.

In order to do this, I've introduced an additional per-entry field
in the undo list in the midend, which tracks which states were
created by `unusual' operations (Solve and Restart). The midend
takes care of suppressing animation and completion flashes during
transitions between a `special' state and its predecessor, relieving
the game backends of having to do it individually.

(This probably means I could remove some complexity in the
flash_time() functions in most backends, but I haven't done that in
this checkin.)

[originally from svn r5791]
midend.c