solve_game() is passed the _initial_ game state, not the most recent
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 May 2005 16:07:26 +0000 (16:07 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sat, 7 May 2005 16:07:26 +0000 (16:07 +0000)
commite73ca44d31d69b43224260ce04d06a745793800e
tree349344595a9ce835aabfa7bb3a8edd7725338b26
parent4f36adaa9e6320465857fd1a49f63d24a2cb8bb9
solve_game() is passed the _initial_ game state, not the most recent
one; so we can't just set `ret->completed = ret->movecount' and hope
it's been set to something other than zero. Instead, we set both
move counts to 1, which is entirely arbitrary but works.

This fixes a subtle bug with the Solve feature: if you pressed
Solve, then disturbed the grid, then brought it back to the solved
state by making more forward moves (rather than using Undo), then
the first time you did this the `Moves since auto-solve' status line
would reset to zero.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@5759 cda61777-01e9-0310-a592-d414129be87e
fifteen.c
netslide.c
sixteen.c
twiddle.c