;ELC   
;;; Compiled
;;; in Emacs version 30.1
;;; with all optimizations.


#@38 Hook to run upon entry to Solitaire.#@2 #@31 Keymap for playing Solitaire.
(byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\316\317%\207" [custom-declare-group solitaire nil "Game of Solitaire." :prefix "solitaire-" :group games custom-declare-variable solitaire-mode-hook funcall function #[0 "\300\207" [nil] 1 (#$ . 124)] (#$ . 83) :type hook] 8)
(defvar solitaire-mode-map (byte-code "\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\304\320\306\321\310\322\312\323\324\325\326\327\330\331\332\333\304\334\306\335\310\336\312\337\340\341\324\342\326\343\330\344\332\345\314\346\347\350\347\351\352&8\207" [special-mode-map define-keymap :parent "C-f" solitaire-right "C-b" solitaire-left "C-p" solitaire-up "C-n" solitaire-down "RET" solitaire-move "SPC" solitaire-do-check "<right>" "<left>" "<up>" "<down>" "S-<right>" solitaire-move-right "S-<left>" solitaire-move-left "S-<up>" solitaire-move-up "S-<down>" solitaire-move-down "<kp-6>" "<kp-4>" "<kp-8>" "<kp-2>" "<kp-5>" solitaire-center-point "S-<kp-6>" "S-<kp-4>" "S-<kp-8>" "S-<kp-2>" "<kp-enter>" "<kp-0>" solitaire-undo "<remap> <undo>" "s" solitaire-solve] 57) (#$ . 130))
(put 'solitaire-mode 'mode-class 'special)
(defvar solitaire-mode-hook nil)
(byte-code "\300\301N\204\f \302\300\301\303#\210\304\305!\204 \302\305\306\307#\210\300\207" [solitaire-mode-hook variable-documentation put "Hook run after entering `solitaire-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it.  (This is true for all hook variables.)" boundp solitaire-mode-map definition-name solitaire-mode] 4)
(defvar solitaire-mode-map (make-sparse-keymap))#@466 Major mode for playing Solitaire.
To learn how to play Solitaire, see the documentation for function
`solitaire'.
\<solitaire-mode-map>
The usual mnemonic keys move the cursor around the board; in addition,
\[solitaire-move] is a prefix character for actually moving a stone on the board.

In addition to any hooks its parent mode `special-mode' might have run,
this mode runs the hook `solitaire-mode-hook', as the final or
penultimate step during initialization.
(byte-code "\301\302N\204 \303\301\302\304\305!#\210\306\307!\204* \303\307\310\311#\210\312\307\306\307!\203& \313\202( \314 \"\210\307\302N\2048 \303\307\302\304\315!#\210\306\300!\204X \303\300\310\311#\210\312\300\306\300!\203P \313\202V \316\300\313\"\210\"\210\300\302N\204f \303\300\302\304\317!#\210\320\321!\203t \321\311\322\"\210\202z \303\311\323\322#\210\313\207" [solitaire-mode-abbrev-table solitaire-mode-map variable-documentation put purecopy "Keymap for `solitaire-mode'." boundp solitaire-mode-syntax-table definition-name solitaire-mode defvar-1 nil make-syntax-table "Syntax table for `solitaire-mode'." define-abbrev-table "Abbrev table for `solitaire-mode'." fboundp derived-mode-set-parent special-mode derived-mode-parent] 5)
(defalias 'solitaire-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203 \314\311\313\310\313N#\210\315!\204' \316\317 \"\210\320\f!\211\2035 \211\321 =\203; \322\f\323 \"\210\210\324\325\"\204R =\204R \326\325C#\210\327!\210\330\f!\210\307\331)\332\333!\207" [delay-mode-hooks major-mode mode-name solitaire-mode-map solitaire-mode-syntax-table solitaire-mode-abbrev-table make-local-variable t special-mode solitaire-mode "Solitaire" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table nil run-mode-hooks solitaire-mode-hook local-abbrev-table truncate-lines show-trailing-whitespace] 5 (#$ . 1770)])#@46 Counter for the stones that are still there.
(defvar solitaire-stones 0 (#$ . 3786))#@22 Center of the board.
(defvar solitaire-center nil (#$ . 3876))#@33 Upper left corner of the board.
(defvar solitaire-start nil (#$ . 3944))
(defvar solitaire-start-x nil)
(defvar solitaire-start-y nil)#@34 Lower right corner of the board.
(defvar solitaire-end nil (#$ . 4084))
(defvar solitaire-end-x nil)
(defvar solitaire-end-y nil)#@199 Non-nil means check for possible moves after each major change.
This takes a while, so switch this on if you like to be informed when
the game is over, or off, if you are working on a slow machine.
(byte-code "\300\301\302\303\304DD\305\306\307%\207" [custom-declare-variable solitaire-auto-eval funcall function #[0 "\300\207" [t] 1 (#$ . 124)] (#$ . 4220) :type boolean] 6)
(defconst solitaire-valid-directions '(solitaire-left solitaire-right solitaire-up solitaire-down))#@1614 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}

(fn ARG)
(defalias 'solitaire #[257 "\305\306!\210\307\310 \210\307\311\312 \210\313 \210db\210\314\315!`C\211)\207" [inhibit-read-only buffer-read-only solitaire-stones solitaire-center buffer-undo-list switch-to-buffer "*Solitaire*" t solitaire-mode 32 solitaire-insert-board solitaire-build-mode-line search-backward "."] 3 (#$ . 4703) "P"])
(defalias 'solitaire-build-mode-line #[0 "\302\303\304\305V\203 \306\307\"\202 \310\311\312\313\314\315\316\257\n\317 \207" [solitaire-stones mode-line-format "" "---" mode-line-buffer-identification 1 format "--> There are %d stones left <--" "------" global-mode-string "   %[(" mode-name minor-mode-alist "%n" ")%]-%-" force-mode-line-update] 10])
(defalias 'solitaire-insert-board #[0 "\306\307 \310 \311V\203 \312\202 \313V\203 \314\202 \315\316V\203% \317\202& \320\321\322ZG\323_Z\324\245\325\"\326 \210\321\327\322\330V\203E \331\202F \332GS\323_$\324\245\333\"c\210\317\230\204_ \330V\203k \334\335\"c\210\334\336\"c\210\211c\210`i\337 \334\340\211\211\211&c\210\334\341\211\211\211&c\210\334\342\211\211\211\211\211\n&	c\210\334\343\211\211%c\210`\334\344\211\211%c\210\334\342\211\211\211\211\211\n&	c\210\334\341\211\211\211&c\210\334\345\211\211\211\211\211&c\210`i&\337 \211')\207" [buffer-read-only solitaire-start solitaire-start-x solitaire-start-y solitaire-center solitaire-end nil window-width window-height 26 "   " 20 " " "" 17 "\n\n" "\n" make-string 7 6 2 32 erase-buffer - 12 3 0 10 format "%sLe Solitaire\n" "%s============\n\n" solitaire-current-line " %s %so%so%so%s" "%s %s %so%so%so%s" "%so%so%so%so%so%so%so%s" "%so%so%so%s" ".%so%so%so%s" "%s %s %so%so%so%s %s " solitaire-end-x solitaire-end-y] 15])
(defalias 'solitaire-right #[0 "`\300u\210g\301U\203 \300u\210\202 g\302U\204\" g\301U\204\" g\303U\205$ \211b\207" [nil 32 0 10] 3 nil [nil (solitaire-mode)]])
(defalias 'solitaire-left #[0 "`\300u\210g\301U\203 \300u\210\202 h\302U\204\" g\301U\204\" g\303U\205$ \211b\207" [-1 32 0 10] 3 nil [nil (solitaire-mode)]])
(defalias 'solitaire-up #[0 "`i\300y\210\301!\210g\302U\203 \300y\210\301!\203 n\203	 h\303U\2044 g\304U\2044 g\305U\2044 g\302U\2056 b\207" [-1 move-to-column 10 0 32 61] 4 nil [nil (solitaire-mode)]])
(defalias 'solitaire-down #[0 "`i\300y\210\301!\210g\302U\203 \300y\210\301!\203 l\203	 g\303U\204. g\304U\204. g\302U\2050 b\207" [1 move-to-column 10 0 32] 4 nil [nil (solitaire-mode)]])
(defalias 'solitaire-center-point #[0 "b\207" [solitaire-center] 1 nil [nil (solitaire-mode)]])
(defalias 'solitaire-move-right #[0 "\300\301!\207" [solitaire-move [right]] 2 nil [nil (solitaire-mode)]])
(defalias 'solitaire-move-left #[0 "\300\301!\207" [solitaire-move [left]] 2 nil [nil (solitaire-mode)]])
(defalias 'solitaire-move-up #[0 "\300\301!\207" [solitaire-move [up]] 2 nil [nil (solitaire-mode)]])
(defalias 'solitaire-move-down #[0 "\300\301!\207" [solitaire-move [down]] 2 nil [nil (solitaire-mode)]])#@310 Check if a move is possible from current point in the specified direction.
MOVESYMBOL specifies the direction.
Returns either a string, indicating cause of contraindication, or a
list containing three numbers: starting field, skipped field (from
which a stone will be taken away) and target.

(fn MOVESYMBOL)
(defalias 'solitaire-possible-move #[257 "\212\211>\203@ ` \210` \210`U\203 \266\301\202A f\302U\2031 f\302U\2031 \211f\303U\2047 \266\304\202A E\266\203\202A \305)\207" [solitaire-valid-directions "Off Board!" 111 46 "Wrong move!" "Not a valid direction"] 7 (#$ . 9300)])#@63 Pseudo-prefix command to move a stone in Solitaire.

(fn DIR)
(defalias 'solitaire-move #[257 "\304\305\"!\306\211;\203 \307!\202K \211@A@AA@b\210\310\311!\210\312c\210b\210\310\311!\210\312c\210\211b\210\310\311!\210\313c\210\211b\210\nS\314 \210\205I \315 \266\203)\207" [solitaire-mode-map buffer-read-only solitaire-stones solitaire-auto-eval solitaire-possible-move lookup-key nil error delete-char 1 46 111 solitaire-build-mode-line solitaire-do-check] 7 (#$ . 9900) ["kMove where? " (solitaire-mode)]])#@37 Undo a move in Solitaire.

(fn ARG)
(defalias 'solitaire-undo #[257 "\306\307!)\210\212\310	b\210\311\312\n\313#\2033 iY\203\f i\fX\203\f \314 Y\203\f \314 X\203\f T\202\f )\315 \210\205@ \316 \207" [buffer-read-only solitaire-end solitaire-start solitaire-start-x solitaire-end-x solitaire-start-y nil undo 0 search-backward "o" done solitaire-current-line solitaire-build-mode-line solitaire-do-check solitaire-end-y solitaire-stones solitaire-auto-eval] 6 (#$ . 10426) ["P" (solitaire-mode)]])#@19 

(fn MOVESYMBOL)
(defalias 'solitaire-check #[0 "\212\306U\203 \307\202@ 	b\210\307C\310\311\n\312#\203? iY\203 i\fX\203 \313 Y\203 \313 X\203 \314\315\316\"\"\210\202 \242)\207" [solitaire-stones solitaire-end solitaire-start solitaire-start-x solitaire-end-x solitaire-start-y 1 0 search-backward "o" done solitaire-current-line mapc make-closure #[257 "\301!<\205\f \300\211\242T\240\207" [V0 solitaire-possible-move] 3 (#$ . 10938)] solitaire-end-y solitaire-valid-directions] 5])#@64 Check for any possible moves in Solitaire.

(fn &optional ARG)
(defalias 'solitaire-do-check #[256 "\301 \302U\203\f \303\304!\207\211\305U\203 \303\306!\207\211\302U\203  \303\307!\207\303\310\"\207" [solitaire-stones solitaire-check 1 message "Yeah! You made it! Only the King is left!" 0 "Sorry, no more possible moves." "There is one possible move." "There are %d possible moves."] 5 (#$ . 11444) ["P" (solitaire-mode)]])#@68 Return the vertical position of point.
Seen in info on text lines.
(defalias 'solitaire-current-line #[0 "\300e`\"i\301U\203 \302\202 \301\\S\207" [count-lines 0 1] 3 (#$ . 11878)])#@93 Spoil Solitaire by solving the game for you - nearly ...
... stops with five stones left ;)#@11 

(fn OP)
(defalias 'solitaire-solve #[0 "\302W\203\n \303\304!\210\305\306 \210\307\310\311\")\210\312 \207" [solitaire-stones solitaire-auto-eval 32 error "Cannot solve game in progress" nil solitaire-center-point mapc #[257 "\211\300>\203\n \301\302!\210\303\304!!\210\211\305>\205 \301\306!\207" [(S-left S-right S-up S-down) sit-for 0.2 execute-kbd-macro vector (S-left S-right S-up S-down) 0.4] 4 (#$ . 12164)] [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] solitaire-do-check] 3 (#$ . 12067) [nil (solitaire-mode)]])
(provide 'solitaire)
