Function: solitaire-solve
solitaire-solve is an interactive and byte-compiled function defined
in solitaire.el.gz.
Signature
(solitaire-solve)
Documentation
Spoil Solitaire by solving the game for you - nearly ...
... stops with five stones left ;)
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/solitaire.el.gz
;; And here's the spoiler:)
(defun solitaire-solve ()
"Spoil Solitaire by solving the game for you - nearly ...
... stops with five stones left ;)"
(interactive nil solitaire-mode)
(when (< solitaire-stones 32)
(error "Cannot solve game in progress"))
(let ((allmoves [up up S-down up left left S-right up up left S-down
up up right right S-left down down down S-up up
S-down down down down S-up left left down
S-right left left up up S-down right right right
S-left left S-right right right right S-left
right down down S-up down down left left S-right
up up up S-down down S-up up up up S-down up
right right S-left down right right down S-up
left left left S-right right S-left down down
left S-right S-up S-left S-left S-down S-right
up S-right left left])
;; down down S-up left S-right
;; right S-left
(solitaire-auto-eval nil))
(solitaire-center-point)
(mapc (lambda (op)
(when (memq op '(S-left S-right S-up S-down))
(sit-for 0.2))
(execute-kbd-macro (vector op))
(when (memq op '(S-left S-right S-up S-down))
(sit-for 0.4)))
allmoves))
(solitaire-do-check))