simon-svn: puzzles: simon

tartarus-commits at lists.tartarus.org tartarus-commits at lists.tartarus.org
Sat May 7 17:07:27 BST 2005


SVN root:       svn://ixion.tartarus.org/main
Changes by:     simon
Revision:       5759
Date:           2005-05-07 17:07:26 +0100 (Sat, 07 May 2005)

Log message (10 lines):
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.

Modified files:
U   puzzles/fifteen.c
U   puzzles/netslide.c
U   puzzles/sixteen.c
U   puzzles/twiddle.c

Links:
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi?rev=5759&view=rev
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/puzzles/fifteen.c?rev=5759&r1=5758&r2=5759
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/puzzles/netslide.c?rev=5759&r1=5758&r2=5759
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/puzzles/sixteen.c?rev=5759&r1=5758&r2=5759
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/puzzles/twiddle.c?rev=5759&r1=5758&r2=5759



More information about the tartarus-commits mailing list