%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/play/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/play/hanoi.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301\302\303\304\305%\210\306\307\302\310\304\301\311\312&\210\306\313\314\315\304\301\311\316&\210\306\317\302\320\304\301\311\312&\210\306\321\322\323\304\301\311\324&\210\306\325\326\327\304\301\311\324&\210\306\330\331\332\304\301\311\324&\210\306\333\334\335\304\301\311\324&\207" [custom-declare-group hanoi nil "The Towers of Hanoi." :group games custom-declare-variable hanoi-horizontal-flag "If non-nil, hanoi poles are oriented horizontally." :type boolean hanoi-move-period 1.0 "Time, in seconds, for each pole-to-pole move of a ring.\nIf nil, move rings as fast as possible while displaying all\nintermediate positions." (restricted-sexp :match-alternatives (numberp 'nil)) hanoi-use-faces "If nil, all hanoi-*-face variables are ignored." hanoi-pole-face 'highlight "Face for poles.  Ignored if hanoi-use-faces is nil." face hanoi-base-face 'highlight "Face for base.  Ignored if hanoi-use-faces is nil." hanoi-even-ring-face 'region "Face for even-numbered rings.  Ignored if hanoi-use-faces is nil." hanoi-odd-ring-face 'secondary-selection "Face for odd-numbered rings.  Ignored if hanoi-use-faces is nil."] 8)
#@47 Towers of Hanoi diversion.  Use NRINGS rings.
(defalias 'hanoi #[(nrings) "\301W\203\n\302\303!\210\304\305\301\"\306 #\207" [nrings 0 error "Negative number of rings" hanoi-internal make-list float-time] 5 (#$ . 1558) (list (if (null current-prefix-arg) 3 (prefix-numeric-value current-prefix-arg)))])
#@176 Towers of Hanoi, UNIX doomsday version.
Displays 32-ring towers that have been progressing at one move per
second since 1970-01-01 00:00:00 GMT.

Repent before ring 31 moves.
(defalias 'hanoi-unix #[nil "\306\307 !\310\311\211\312	S\211\313Y\2035\f\203#\314\315\316\"\245\202&\n\317_\320\321\n\322\"!B\311\202
\237,\323\324\310
#+\207" [start #1=#:--cl-var-- x #2=#:--cl-var-- #3=#:--cl-var-- bits ftruncate float-time 32 nil t 0 expt 2.0 31 2.0 truncate mod 2.0 1.0 hanoi-internal hanoi-move-period] 5 (#$ . 1872) nil])
#@194 Like hanoi-unix, but pretend to have a 64-bit clock.
This is, necessarily (as of Emacs 20.3), a crock.  When the
current-time interface is made s2G-compliant, hanoi.el will need
to be updated.
(defalias 'hanoi-unix-64 #[nil "\306\307 !\310\311\211\312	S\211\313Y\2035\f\203#\314\315\316\"\245\202&\n\317_\320\321\n\322\"!B\311\202
\237,\323\324\310
#+\207" [start #1=#:--cl-var-- x #2=#:--cl-var-- #3=#:--cl-var-- bits ftruncate float-time 64 nil t 0 expt 2.0 63 2.0 truncate mod 2.0 1.0 hanoi-internal hanoi-move-period] 5 (#$ . 2420) nil])
#@180 Towers of Hanoi internal interface.  Use NRINGS rings.
Start after n steps, where BITS is a big-endian list of the bits of n.
BITS must be of length nrings.  Start at START-TIME.
(defalias 'hanoi-internal #[(nrings bits start-time) "\306\307!\210\310p!\210\311\312\216	?\313\314\315S]\"G\n\203 \316\202!\317\n\203*\320\202+\316.\321\f\322_\\\n\203;\323 \202=\324 S]\211/\325Z\322\245\2110\325\2451/\325\2452/0T\325\245Z3123E4\322\315\n\203q\324 \202s\323 S\325\\Z]^5\311\21167\311\21189\311:\326 \210\327;	\203G\3305\322#\2116S768\3319/<<S\211<\315Y\203\3365\315U\204\321\332\3335S\"\210.c\210\334`S`=#\210\332\333\325\\\"\210\335c\210\202\254)\336\331!\2104\311>\211?\203C?@\211>\f\325\245Z@\311A\fB\330@6_5\337#ABS\211B\315Y\2039\340A\330A\337#\333
$\210\334A\330A\337#C#\210@T@\202+?A\211?\204\356*\202/T6\337869\341\324 S\325\\5#D\332\335\315D]\"\210`7\332\333/\"\210\335c\210TE\342/\333\"F4G\311\211>A\311HG:\203\327G@\211>\f\325\245Z\211A\f\\H\334AHCF$\210AIHJIJW\203\315FI
I\210IT\211I\202\267*GA\211G\202\215F-KES\211E\315Y\203\360K\335\261\210\202\334*\332./\"\210\334`/Z`=#\210\343\344 9\315D[]_T\"\210)4L\311\211>M\311\211NOL:\203RL@>78>_\\\211M9\325\\_\\\211NMBOBOLA\211L\202#O\237-0\fZ\325\245^PSQ\311\211RS\313\345\f\"T\311\211UV\311WQ\315Y\203\373QP_\245TR\f\325R_\\S\n\203\232\346\202\233\347\342RS\n\203\247\317\202\250\316\"\313TQ\"\342RS\n\203\273\317\202\274\316\"\n\203\305\350\202\306\351\260U\352Q\337\"\337=\203\331X\202\333YV\334\315UGVU$\210USBWBWQS\211Q\202{W\237.\311\211Z[\\]\353^\\]@]A@\325]8_&\210,\354\355!.\207" [show-trailing-whitespace hanoi-horizontal-flag vert nrings pole-width pole-char switch-to-buffer "*Hanoi*" buffer-disable-undo nil #[nil "\301\302 \207" [buffer-read-only t force-mode-line-update] 1] format "%d" 0 124 45 61 8 3 window-width window-height 2 erase-buffer t + -1 insert-char 32 hanoi-put-face 10 delete-char 1 subst-char-in-region - make-string set-window-start selected-window "%%0%dd" "<" "^" ">" "v" logand hanoi-n message "Done" base-char base-len max-ring-diameter pole1-coord pole2-coord pole3-coord pole-coords base-lines line-offset fly-row-start fly-step baseward-step buffer-read-only truncate-lines #1=#:--cl-var-- hanoi-base-face coord --dolist-tail-- row start #2=#:--cl-var-- hanoi-pole-face extra-lines #3=#:--cl-var-- line #4=#:--cl-var-- end i #5=#:--cl-var-- pole-line #6=#:--cl-var-- fly-pos base #7=#:--cl-var-- max-radius n radius diameter format-str str face #8=#:--cl-var-- hanoi-odd-ring-face hanoi-even-ring-face column-number-mode line-number-mode rings poles bits start-time] 8 (#$ . 2989)])
#@74 If hanoi-use-faces is non-nil, call put-text-property for face property.
(defalias 'hanoi-put-face #[(start end value &optional object) "\205\305	\n\306\f%\207" [hanoi-use-faces start end value object put-text-property face] 6 (#$ . 5807)])
(defalias 'hanoi-0 #[(rings from to work start-time) "\204	\207\305A\n\f\306@\f\305A\f\n	%$%\207" [rings start-time work to from hanoi-0 hanoi-move-ring] 15])
(defalias 'hanoi-n #[(bits rings from to work start-time) "\204\n\306\307!\210	\207\n@\307U\2030\310@\"\210\311A\f
\312@
\313\nAA\f
	&$%\207\310@
\"\210\313\nAA\f
	&\207" [rings start-time bits from work to hanoi-sit-for 0 hanoi-insert-ring hanoi-0 hanoi-move-ring hanoi-n] 16])
(defalias 'hanoi-insert-ring #[(ring pole) "\211\211@\nZ\240\210)@@A\306\245\f_Z\f@\240\210

\f\307AW\203^\310
\211T
f\fH$\210\311
\211T\312\f\"#\210
\\
T\211\202,,\313@!*\207" [pole #1=#:v baseward-step ring fly-step start 2 0 subst-char-in-region set-text-properties text-properties-at hanoi-goto-char str pos #2=#:--cl-var-- i #3=#:--cl-var--] 7])
(defalias 'hanoi-goto-char #[(pos) "\204\304 	X\203	\202\304 	\nZ\246\\b\207" [hanoi-horizontal-flag pos fly-row-start baseward-step window-start] 3])
(defalias 'hanoi-move-ring #[(ring from to start-time) "\211\211@\n\\\240\210)\211\211@\nZ\240\210)
@AZ\n\245\306AAZ\245!AAZ\245@AZ\n\245\203E\307\202F\310\203Q\310\202R\307___\311#\312\203\273\313 \314!\245!\313\"\315 #Z\211 W\203\267\316 !\"\"\317
\"!\"\210\320\"!_ Z!\210\202\212+\202\342\307\"$\"$X\203\341\317
\"!\"\210\320\321!\210\"\310\\\211\"\202\304*\317
@\"\210\205\362#\\.\207" [from #1=#:v baseward-step to #2=#:v ring abs 1 2 + #[(tick) "	X\203\nA\f
\245Z_\\\207	\\X\203'\nA	Z	\245_\\\207\nA\306	#
\245_\\\207" [tick flyward-ticks from baseward-step flyward-steps ticks-per-pole-step - fly-ticks directed-fly-step ticks-per-fly-step to] 6] nil float float-time ceiling hanoi-ring-to-pos hanoi-sit-for 0 flyward-steps fly-step fly-steps directed-fly-step baseward-steps hanoi-horizontal-flag ticks-per-pole-step ticks-per-fly-step flyward-ticks fly-ticks baseward-ticks total-ticks tick-to-pos hanoi-move-period elapsed tick-period tick start-time #3=#:--cl-var--] 5])
(defalias 'hanoi-sit-for #[(seconds) "\301!?\205\302\303\304\"\207" [seconds sit-for signal quit ("I can tell you've had enough")] 3])
(defalias 'hanoi-ring-to-pos #[(ring pos) "@	U\2049@A\306\245\n_Z	@ZZ
\203p\307A\310\211\310W\203l\fW\203?\202F\311A\312#\n_\\\f\n_\\\313\211T\211T$\210T\211\202.-\202\243A\\\fA\\\314\fZ!ZW\203\230\fW\203\225\202\230\313\f\315%\210**\316@!\316	!=\2045@\n\306\245_Z\211\n_\\\316@!\211\203\321\202\322\317\203\335\317\202\337 \205\350!\"
\203#$%	#W\203\320	\211T $\210\321	\211T\"#\210	%\\\211\202\372+\2023\320 $\210\321\"#\210.	\240\210\322	!\207" [ring pos fly-step start new-start hanoi-horizontal-flag 2 0 nil - 1 transpose-regions abs t hanoi-pos-on-tower-p 32 subst-char-in-region hanoi-put-face hanoi-goto-char i #1=#:--cl-var-- j old-pos new-pos new-end end pole-width pole-start pole-end on-pole pole-char new-char curr-char hanoi-pole-face face #2=#:--cl-var-- line-offset #3=#:--cl-var--] 7])
(defalias 'hanoi-pos-on-tower-p #[(pos) "\203	\n\246U?\207	\f\\Y\207" [hanoi-horizontal-flag pos fly-step fly-row-start baseward-step] 3])
(provide 'hanoi)

Zerion Mini Shell 1.0