Solve function for Inertia, using what's essentially an approximate

TSP algorithm.

[originally from svn r6289]
This commit is contained in:
Simon Tatham
2005-09-11 12:40:49 +00:00
parent 08c8cf370e
commit b25fcc3f26
2 changed files with 853 additions and 9 deletions

View File

@ -1775,6 +1775,18 @@ numeric keypad. Alternatively, if you click the left mouse button on
the grid, the ball will begin a move in the general direction of
where you clicked.
If you use the \q{Solve} function on this game, the program will
compute a path through the grid which collects all the remaining
gems and returns to the current position. A hint arrow will appear
on the ball indicating the direction in which you should move to
begin on this path. If you then move in that direction, the arrow
will update to indicate the next direction on the path. You can also
press Space to automatically move in the direction of the hint
arrow. If you move in a different direction from the one shown by
the arrow, the hint arrows will stop appearing because you have
strayed from the provided path; you can then use \q{Solve} again to
generate a new path if you want to.
All the actions described in \k{common-actions} are also available.
In particular, if you do run into a mine and die, you can use the
Undo function and resume playing from before the fatal move. The