Function: solitaire
solitaire is an autoloaded, interactive and byte-compiled function
defined in solitaire.el.gz.
Signature
(solitaire ARG)
Documentation
Play Solitaire.
To play Solitaire, type M-x solitaire (solitaire).
Move around the board using the cursor keys.
Move stones using RET (solitaire-move) followed by a direction key.
Undo moves using C-_ (solitaire-undo).
Check for possible moves using SPC (solitaire-do-check).
(The variable solitaire-auto-eval controls whether to automatically
check after each move or undo.)
What is Solitaire?
I don't know who invented this game, but it seems to be rather old and its origin seems to be northern Africa. Here's how to play: Initially, the board will look similar to this:
Le Solitaire
============
o o o
o o o
o o o o o o o
o o o . o o o
o o o o o o o
o o o
o o o
Let's call the o's stones and the .'s holes. One stone fits into one hole. As you can see, all holes but one are occupied by stones. The aim of the game is to get rid of all but one stone, leaving that last one in the middle of the board if you're cool.
A stone can be moved if there is another stone next to it, and a hole
after that one. Thus there must be three fields in a row, either
horizontally or vertically, up, down, left or right, which look like
this: o o .
Then the first stone is moved to the hole, jumping over the second,
which therefore is taken away. The above thus evaluates to: . . o
That's all. Here's the board after two moves:
o o o
. o o
o o . o o o o
o . o o o o o
o o o o o o o
o o o
o o o
Pick your favorite shortcuts:
- negative-argument
0 digit-argument
1 digit-argument
2 digit-argument
3 digit-argument
4 digit-argument
5 digit-argument
6 digit-argument
7 digit-argument
8 digit-argument
9 digit-argument
< beginning-of-buffer
<down> solitaire-down
<kp-0> solitaire-undo
<kp-2> solitaire-down
<kp-4> solitaire-left
<kp-5> solitaire-center-point
<kp-6> solitaire-right
<kp-8> solitaire-up
<kp-enter> solitaire-move
<left> solitaire-left
<right> solitaire-right
<up> solitaire-up
> end-of-buffer
? describe-mode
C-b solitaire-left
C-f solitaire-right
C-n solitaire-down
C-p solitaire-up
C-x u solitaire-undo
DEL scroll-down-command
RET solitaire-move
S-<down> solitaire-move-down
S-<kp-2> solitaire-move-down
S-<kp-4> solitaire-move-left
S-<kp-6> solitaire-move-right
S-<kp-8> solitaire-move-up
S-<left> solitaire-move-left
S-<right> solitaire-move-right
S-<up> solitaire-move-up
S-SPC scroll-down-command
SPC scroll-up-command
SPC solitaire-do-check
SPC..~ undefined
g revert-buffer
h describe-mode
q quit-window
s solitaire-solve
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/play/solitaire.el.gz
;;;###autoload
(defun solitaire (_arg)
"Play Solitaire.
To play Solitaire, type \\[solitaire].
\\<solitaire-mode-map>
Move around the board using the cursor keys.
Move stones using \\[solitaire-move] followed by a direction key.
Undo moves using \\[solitaire-undo].
Check for possible moves using \\[solitaire-do-check].
\(The variable `solitaire-auto-eval' controls whether to automatically
check after each move or undo.)
What is Solitaire?
I don't know who invented this game, but it seems to be rather old and
its origin seems to be northern Africa. Here's how to play:
Initially, the board will look similar to this:
Le Solitaire
============
o o o
o o o
o o o o o o o
o o o . o o o
o o o o o o o
o o o
o o o
Let's call the o's stones and the .'s holes. One stone fits into one
hole. As you can see, all holes but one are occupied by stones. The
aim of the game is to get rid of all but one stone, leaving that last
one in the middle of the board if you're cool.
A stone can be moved if there is another stone next to it, and a hole
after that one. Thus there must be three fields in a row, either
horizontally or vertically, up, down, left or right, which look like
this: o o .
Then the first stone is moved to the hole, jumping over the second,
which therefore is taken away. The above thus `evaluates' to: . . o
That's all. Here's the board after two moves:
o o o
. o o
o o . o o o o
o . o o o o o
o o o o o o o
o o o
o o o
Pick your favorite shortcuts:
\\{solitaire-mode-map}"
(interactive "P")
(switch-to-buffer "*Solitaire*")
(let ((inhibit-read-only t))
(solitaire-mode)
(setq buffer-read-only t)
(setq solitaire-stones 32)
(solitaire-insert-board)
(solitaire-build-mode-line)
(goto-char (point-max))
(setq solitaire-center (search-backward "."))
(setq buffer-undo-list (list (point)))))