`Restart' is now an undo-able action: it appends a move to the end
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 17 May 2005 11:46:55 +0000 (11:46 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 17 May 2005 11:46:55 +0000 (11:46 +0000)
commit28d0118c5fbdbbbb656f0ea6fb3b2e48e6aa73f8
tree3907ec423f1026ca5a30c8697633676e30368ce9
parent50ff573008fcfcc1cf1e9c071d36f5c84e2684dc
`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.)

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5791 cda61777-01e9-0310-a592-d414129be87e
midend.c