home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / games / hanoi.elc < prev    next >
Emacs Compiled Lisp  |  1995-08-29  |  2.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was processed as: Emacs Compiled Lisp (other/emacsCompiledLisp).
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
1% dexvert Emacs Compiled Lisp (other/emacsCompiledLisp) magic Unsupported
1% dexvert Combustion 2 Particle Library (other/combustion2ParticleLibrary) ext Unsupported
100% file Emacs/XEmacs v19 byte-compiled Lisp data default
99% file data default
100% TrID Emacs/XEmacs byte-compiled Lisp (generic) default
100% xdgMime text/x-emacs-lisp default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3b 45 4c 43 13 00 00 00 | 0a 3b 3b 3b 20 63 6f 6d |;ELC....|.;;; com|
|00000010| 70 69 6c 65 64 20 62 79 | 20 63 74 68 6f 6d 70 40 |piled by| cthomp@|
|00000020| 77 69 6c 6c 6f 77 2e 63 | 73 2e 75 69 75 63 2e 65 |willow.c|s.uiuc.e|
|00000030| 64 75 20 6f 6e 20 54 75 | 65 20 41 75 67 20 32 39 |du on Tu|e Aug 29|
|00000040| 20 31 34 3a 30 31 3a 35 | 35 20 31 39 39 35 0a 3b | 14:01:5|5 1995.;|
|00000050| 3b 3b 20 66 72 6f 6d 20 | 66 69 6c 65 20 2f 78 65 |;; from |file /xe|
|00000060| 6d 61 63 73 2f 78 65 6d | 61 63 73 2d 31 39 2e 31 |macs/xem|acs-19.1|
|00000070| 33 2d 72 65 6c 65 61 73 | 65 2f 65 64 69 74 6f 72 |3-releas|e/editor|
|00000080| 2f 6c 69 73 70 2f 67 61 | 6d 65 73 2f 68 61 6e 6f |/lisp/ga|mes/hano|
|00000090| 69 2e 65 6c 0a 3b 3b 3b | 20 65 6d 61 63 73 20 76 |i.el.;;;| emacs v|
|000000a0| 65 72 73 69 6f 6e 20 31 | 39 2e 31 33 20 58 45 6d |ersion 1|9.13 XEm|
|000000b0| 61 63 73 20 4c 75 63 69 | 64 2e 0a 3b 3b 3b 20 62 |acs Luci|d..;;; b|
|000000c0| 79 74 65 63 6f 6d 70 20 | 76 65 72 73 69 6f 6e 20 |ytecomp |version |
|000000d0| 32 2e 32 35 3b 20 31 2d | 53 65 70 2d 39 34 2e 0a |2.25; 1-|Sep-94..|
|000000e0| 3b 3b 3b 20 6f 70 74 69 | 6d 69 7a 61 74 69 6f 6e |;;; opti|mization|
|000000f0| 20 69 73 20 6f 6e 2e 0a | 3b 3b 3b 20 74 68 69 73 | is on..|;;; this|
|00000100| 20 66 69 6c 65 20 75 73 | 65 73 20 6f 70 63 6f 64 | file us|es opcod|
|00000110| 65 73 20 77 68 69 63 68 | 20 64 6f 20 6e 6f 74 20 |es which| do not |
|00000120| 65 78 69 73 74 20 69 6e | 20 45 6d 61 63 73 20 31 |exist in| Emacs 1|
|00000130| 38 2e 0a 0a 28 69 66 20 | 28 61 6e 64 20 28 62 6f |8...(if |(and (bo|
|00000140| 75 6e 64 70 20 27 65 6d | 61 63 73 2d 76 65 72 73 |undp 'em|acs-vers|
|00000150| 69 6f 6e 29 0a 09 20 28 | 6f 72 20 28 61 6e 64 20 |ion).. (|or (and |
|00000160| 28 62 6f 75 6e 64 70 20 | 27 65 70 6f 63 68 3a 3a |(boundp |'epoch::|
|00000170| 76 65 72 73 69 6f 6e 29 | 20 65 70 6f 63 68 3a 3a |version)| epoch::|
|00000180| 76 65 72 73 69 6f 6e 29 | 0a 09 20 20 20 20 20 28 |version)|.. (|
|00000190| 73 74 72 69 6e 67 2d 6c | 65 73 73 70 20 65 6d 61 |string-l|essp ema|
|000001a0| 63 73 2d 76 65 72 73 69 | 6f 6e 20 22 31 39 22 29 |cs-versi|on "19")|
|000001b0| 29 29 0a 20 20 20 20 28 | 65 72 72 6f 72 20 22 54 |)). (|error "T|
|000001c0| 68 69 73 20 66 69 6c 65 | 20 77 61 73 20 63 6f 6d |his file| was com|
|000001d0| 70 69 6c 65 64 20 66 6f | 72 20 45 6d 61 63 73 20 |piled fo|r Emacs |
|000001e0| 31 39 2e 22 29 29 0a 0a | 28 66 73 65 74 20 27 68 |19."))..|(fset 'h|
|000001f0| 61 6e 6f 69 2d 74 6f 70 | 6f 73 20 23 5b 28 72 6f |anoi-top|os #[(ro|
|00000200| 77 20 63 6f 6c 29 20 22 | c0 09 21 88 c2 79 88 0b |w col) "|..!..y..|
|00000210| 75 87 22 20 5b 67 6f 74 | 6f 2d 6c 69 6e 65 20 72 |u." [got|o-line r|
|00000220| 6f 77 20 30 20 63 6f 6c | 5d 20 32 5d 29 0a 28 66 |ow 0 col|] 2]).(f|
|00000230| 73 65 74 20 27 68 61 6e | 6f 69 20 23 5b 28 6e 72 |set 'han|oi #[(nr|
|00000240| 69 6e 67 73 29 20 22 08 | c1 58 ab 84 c2 c3 21 88 |ings) ".|.X....!.|
|00000250| c4 1d c4 1e 06 c7 c8 20 | 21 1e 07 c9 c8 20 21 1e |....... |!.... !.|
|00000260| 09 ca 0e 09 cb a5 cc 5c | 22 1e 0d 08 ce 5c 5c 08 |.......\|"....\\.|
|00000270| 54 1e 0f 1e 10 0e 07 0e | 10 59 ab 87 0e 0d 0e 0f |T.......|.Y......|
|00000280| 56 ac a6 d1 20 88 c7 c8 | 20 21 89 16 07 0e 10 59 |V... ...| !.....Y|
|00000290| ab 8f ca 0e 09 cb a5 cc | 5c 22 89 16 0d 0e 0f 56 |........|\".....V|
|000002a0| ac 88 c2 d2 0e 0f 0e 10 | 23 88 0e 07 d3 5a 0e 10 |........|#....Z..|
|000002b0| 56 ab 86 0e 07 d3 5a aa | 82 0e 07 15 2a 0d 08 5a |V.....Z.|....*..Z|
|000002c0| d4 5a 0e 0d 0d 42 0e 0d | d3 5f 0d 42 0e 0d d5 5f |.Z...B..|._.B..._|
|000002d0| 0d 42 d6 08 c4 5c 22 1e | 17 1e 18 1e 19 1e 1a 1e |.B...\".|........|
|000002e0| 06 c1 1e 1b c1 08 57 ab | a6 0e 17 0e 1b dc c4 dd |......W.|........|
|000002f0| 0e 1b 89 d3 5c 5c 5c 5c | 0e 1b de 5c 5c 5c 22 dd |....\\\\|...\\\".|
|00000300| 0e 1b 89 d3 5c 5c 5c 5c | df 5c 22 23 49 88 0e 1b |....\\\\|.\"#I...|
|00000310| 54 89 16 1b aa 56 29 e0 | e1 21 88 c4 16 5c 22 e3 |T....V).|.!...\".|
|00000320| 70 21 88 e4 20 88 c1 1e | 1b 0e 1b 0d 57 ab 91 0e |p!.. ...|....W...|
|00000330| 1b 54 16 1b e5 df 0e 09 | 53 5c 22 88 e6 63 88 aa |.T......|S\"..c..|
|00000340| 69 29 e5 e7 0e 09 53 5c | 22 88 d4 1e 28 0e 28 cb |i)....S\|"...(.(.|
|00000350| 57 ab b3 e9 0e 06 0e 28 | 0e 0d 5f 5c 22 88 0e 28 |W......(|.._\"..(|
|00000360| ea 5c 5c 16 28 0e 06 1e | 1b 0e 1b 0d 57 ab 96 0e |.\\.(...|....W...|
|00000370| 1b 54 16 1b eb d4 21 88 | ec 63 88 ed d4 21 88 ee |.T....!.|.c...!..|
|00000380| d4 21 88 aa 64 29 aa 47 | 29 c1 c4 1e 2f 89 1e 1b |.!..d).G|).../...|
|00000390| 08 57 ab b7 0e 17 08 0e | 1b 5a d4 5a 48 89 16 2f |.W......|.Z.ZH../|
|000003a0| c1 0d 0e 1b 5a 49 88 e9 | 0e 1a 41 0e 1a 40 08 0e |....ZI..|..A..@..|
|000003b0| 1b 5a 5a 5c 22 88 f0 0e | 2f f1 c4 23 88 0e 1a 89 |.ZZ\"...|/..#....|
|000003c0| 41 53 a1 88 0e 1b 54 89 | 16 1b aa 45 2a f1 16 5c |AS....T.|...E*..\|
|000003d0| 22 f2 c1 21 88 f3 08 53 | 0e 1a 0e 19 0e 18 24 88 |"..!...S|......$.|
|000003e0| 65 62 88 f4 f5 21 88 f1 | 16 5c 22 f6 f7 20 21 88 |eb...!..|.\".. !.|
|000003f0| f2 c1 21 2e 5c 6e 87 22 | 20 5b 6e 72 69 6e 67 73 |..!.\n."| [nrings|
|00000400| 20 30 20 65 72 72 6f 72 | 20 22 4e 65 67 61 74 69 | 0 error| "Negati|
|00000410| 76 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 72 69 6e |ve numbe|r of rin|
|00000420| 67 73 22 20 6e 69 6c 20 | 66 6c 6f 6f 72 2d 72 6f |gs" nil |floor-ro|
|00000430| 77 20 66 6c 79 2d 72 6f | 77 20 77 69 6e 64 6f 77 |w fly-ro|w window|
|00000440| 2d 68 65 69 67 68 74 20 | 73 65 6c 65 63 74 65 64 |-height |selected|
|00000450| 2d 77 69 6e 64 6f 77 20 | 77 69 6e 64 6f 77 2d 77 |-window |window-w|
|00000460| 69 64 74 68 20 6c 6f 67 | 61 6e 64 20 36 20 2d 32 |idth log|and 6 -2|
|00000470| 20 70 6f 6c 65 2d 73 70 | 61 63 69 6e 67 20 34 20 | pole-sp|acing 4 |
|00000480| 77 20 68 20 64 65 6c 65 | 74 65 2d 6f 74 68 65 72 |w h dele|te-other|
|00000490| 2d 77 69 6e 64 6f 77 73 | 20 22 53 63 72 65 65 6e |-windows| "Screen|
|000004a0| 20 69 73 20 74 6f 6f 20 | 73 6d 61 6c 6c 20 28 6e | is too |small (n|
|000004b0| 65 65 64 20 61 74 20 6c | 65 61 73 74 20 25 64 78 |eed at l|east %dx|
|000004c0| 25 64 29 22 20 33 20 31 | 20 35 20 6d 61 6b 65 2d |%d)" 3 1| 5 make-|
|000004d0| 76 65 63 74 6f 72 20 72 | 69 6e 67 73 20 70 6f 6c |vector r|ings pol|
|000004e0| 65 2d 33 20 70 6f 6c 65 | 2d 32 20 70 6f 6c 65 2d |e-3 pole|-2 pole-|
|000004f0| 31 20 69 20 76 65 63 74 | 6f 72 20 6d 61 6b 65 2d |1 i vect|or make-|
|00000500| 73 74 72 69 6e 67 20 34 | 38 20 33 32 20 73 77 69 |string 4|8 32 swi|
|00000510| 74 63 68 2d 74 6f 2d 62 | 75 66 66 65 72 20 22 2a |tch-to-b|uffer "*|
|00000520| 48 61 6e 6f 69 2a 22 20 | 62 75 66 66 65 72 2d 72 |Hanoi*" |buffer-r|
|00000530| 65 61 64 2d 6f 6e 6c 79 | 20 62 75 66 66 65 72 2d |ead-only| buffer-|
|00000540| 64 69 73 61 62 6c 65 2d | 75 6e 64 6f 20 65 72 61 |disable-|undo era|
|00000550| 73 65 2d 62 75 66 66 65 | 72 20 69 6e 73 65 72 74 |se-buffe|r insert|
|00000560| 2d 63 68 61 72 20 31 30 | 20 36 31 20 6e 20 68 61 |-char 10| 61 n ha|
|00000570| 6e 6f 69 2d 74 6f 70 6f | 73 20 32 20 6e 65 78 74 |noi-topo|s 2 next|
|00000580| 2d 6c 69 6e 65 20 31 32 | 34 20 64 65 6c 65 74 65 |-line 12|4 delete|
|00000590| 2d 63 68 61 72 20 62 61 | 63 6b 77 61 72 64 2d 63 |-char ba|ckward-c|
|000005a0| 68 61 72 20 72 69 6e 67 | 20 68 61 6e 6f 69 2d 64 |har ring| hanoi-d|
|000005b0| 72 61 77 2d 72 69 6e 67 | 20 74 20 73 69 74 2d 66 |raw-ring| t sit-f|
|000005c0| 6f 72 20 68 61 6e 6f 69 | 30 20 6d 65 73 73 61 67 |or hanoi|0 messag|
|000005d0| 65 20 22 44 6f 6e 65 22 | 20 73 65 74 2d 62 75 66 |e "Done"| set-buf|
|000005e0| 66 65 72 2d 6d 6f 64 69 | 66 69 65 64 2d 70 20 62 |fer-modi|fied-p b|
|000005f0| 75 66 66 65 72 2d 6d 6f | 64 69 66 69 65 64 2d 70 |uffer-mo|dified-p|
|00000600| 5d 20 31 30 20 22 5c 0a | 54 6f 77 65 72 73 20 6f |] 10 "\.|Towers o|
|00000610| 66 20 48 61 6e 6f 69 20 | 64 69 76 65 72 73 69 6f |f Hanoi |diversio|
|00000620| 6e 2e 20 20 41 72 67 75 | 6d 65 6e 74 20 69 73 20 |n. Argu|ment is |
|00000630| 6e 75 6d 62 65 72 20 6f | 66 20 72 69 6e 67 73 2e |number o|f rings.|
|00000640| 22 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 08 ac |" (byte-|code "..|
|00000650| 83 c1 aa 83 c2 08 21 43 | 87 22 20 5b 63 75 72 72 |......!C|." [curr|
|00000660| 65 6e 74 2d 70 72 65 66 | 69 78 2d 61 72 67 20 33 |ent-pref|ix-arg 3|
|00000670| 20 70 72 65 66 69 78 2d | 6e 75 6d 65 72 69 63 2d | prefix-|numeric-|
|00000680| 76 61 6c 75 65 5d 20 32 | 29 5d 29 0a 28 62 79 74 |value] 2|)]).(byt|
|00000690| 65 2d 63 6f 64 65 20 22 | c0 c1 4d 88 c2 c3 4d 88 |e-code "|..M...M.|
|000006a0| c4 c5 4d 88 c6 c7 21 87 | 22 20 5b 68 61 6e 6f 69 |..M...!.|" [hanoi|
|000006b0| 30 20 23 5b 28 6e 20 66 | 72 6f 6d 20 74 6f 20 77 |0 #[(n f|rom to w|
|000006c0| 6f 72 6b 29 20 22 c0 20 | ab 86 c1 c2 c3 43 5c 22 |ork) ". |.....C\"|
|000006d0| 87 0c c5 57 ae 9d c6 0c | 53 0e 07 0e 08 0e 09 24 |...W....|S......$|
|000006e0| 88 ca 0c 0e 07 0e 09 23 | 88 c6 0c 53 0e 08 0e 09 |.......#|...S....|
|000006f0| 0e 07 24 87 22 20 5b 69 | 6e 70 75 74 2d 70 65 6e |..$." [i|nput-pen|
|00000700| 64 69 6e 67 2d 70 20 73 | 69 67 6e 61 6c 20 71 75 |ding-p s|ignal qu|
|00000710| 69 74 20 22 49 20 63 61 | 6e 20 74 65 6c 6c 20 79 |it "I ca|n tell y|
|00000720| 6f 75 27 76 65 20 68 61 | 64 20 65 6e 6f 75 67 68 |ou've ha|d enough|
|00000730| 22 20 6e 20 30 20 68 61 | 6e 6f 69 30 20 66 72 6f |" n 0 ha|noi0 fro|
|00000740| 6d 20 77 6f 72 6b 20 74 | 6f 20 68 61 6e 6f 69 2d |m work t|o hanoi-|
|00000750| 6d 6f 76 65 2d 72 69 6e | 67 5d 20 35 5d 20 68 61 |move-rin|g] 5] ha|
|00000760| 6e 6f 69 2d 6d 6f 76 65 | 2d 72 69 6e 67 20 23 5b |noi-move|-ring #[|
|00000770| 28 6e 20 66 72 6f 6d 20 | 74 6f 29 20 22 08 09 48 |(n from |to) "..H|
|00000780| c2 1b 89 1c c5 48 0e 06 | 40 09 5a c7 5a 0e 08 40 |.....H..|@.Z.Z..@|
|00000790| 09 5a c7 5a 0e 08 41 1e | 09 1e 5c 6e 1e 0b 1e 0c |.Z.Z..A.|..\n....|
|000007a0| cd 0e 0c 0e 0b 5c 22 88 | 0e 0c 0e 0e 56 ab 9c cf |.....\".|....V...|
|000007b0| 0c c2 d0 23 88 d1 c7 21 | 88 cf 0c d0 c2 23 88 d2 |...#...!|.....#..|
|000007c0| c5 21 88 0e 0c 53 89 16 | 0c aa 5f 0e 06 89 41 54 |.!...S..|.._...AT|
|000007d0| a1 88 0e 5c 6e 0e 0b 9a | ac c4 0e 5c 6e 0e 0b 56 |...\n...|...\n..V|
|000007e0| ab 9b c7 7f 88 d3 d4 21 | 88 c5 79 88 d5 89 b1 02 |.......!|..y.....|
|000007f0| 88 d2 c5 21 88 0e 0b 54 | 54 16 0b aa 57 0e 5c 6e |...!...T|T...W.\n|
|00000800| 0e 0b 57 ab 50 c5 79 88 | d6 d4 21 88 c7 7f 88 d5 |..W.P.y.|..!.....|
|00000810| 89 b1 02 88 d2 c5 21 88 | 0e 0b 53 53 16 0b aa 35 |......!.|..SS...5|
|00000820| cd 0e 0e 0e 5c 6e 5c 22 | 88 0e 0c 0e 09 57 ab a0 |....\n\"|.....W..|
|00000830| cf 0c c2 0e 0c 0e 0e 56 | 23 88 d7 c7 21 88 cf 0c |.......V|#...!...|
|00000840| d0 c2 23 88 d2 c5 21 88 | 0e 0c 54 89 16 0c aa 5b |..#...!.|..T....[|
|00000850| 0c c5 0e 09 49 88 0e 08 | 89 41 53 a1 2e 06 87 22 |....I...|.AS...."|
|00000860| 20 5b 72 69 6e 67 73 20 | 6e 20 6e 69 6c 20 62 75 | [rings |n nil bu|
|00000870| 66 66 65 72 2d 72 65 61 | 64 2d 6f 6e 6c 79 20 72 |ffer-rea|d-only r|
|00000880| 69 6e 67 20 30 20 66 72 | 6f 6d 20 31 20 74 6f 20 |ing 0 fr|om 1 to |
|00000890| 64 73 74 2d 72 6f 77 20 | 64 73 74 2d 63 6f 6c 20 |dst-row |dst-col |
|000008a0| 63 6f 6c 20 72 6f 77 20 | 68 61 6e 6f 69 2d 74 6f |col row |hanoi-to|
|000008b0| 70 6f 73 20 66 6c 79 2d | 72 6f 77 20 68 61 6e 6f |pos fly-|row hano|
|000008c0| 69 2d 64 72 61 77 2d 72 | 69 6e 67 20 74 20 70 72 |i-draw-r|ing t pr|
|000008d0| 65 76 69 6f 75 73 2d 6c | 69 6e 65 20 73 69 74 2d |evious-l|ine sit-|
|000008e0| 66 6f 72 20 64 65 6c 65 | 74 65 2d 62 61 63 6b 77 |for dele|te-backw|
|000008f0| 61 72 64 2d 63 68 61 72 | 20 32 20 33 32 20 64 65 |ard-char| 2 32 de|
|00000900| 6c 65 74 65 2d 63 68 61 | 72 20 6e 65 78 74 2d 6c |lete-cha|r next-l|
|00000910| 69 6e 65 5d 20 36 5d 20 | 68 61 6e 6f 69 2d 64 72 |ine] 6] |hanoi-dr|
|00000920| 61 77 2d 72 69 6e 67 20 | 23 5b 28 72 69 6e 67 20 |aw-ring |#[(ring |
|00000930| 66 31 20 66 32 29 20 22 | 8a 08 ab 85 09 c2 48 aa |f1 f2) "|......H.|
|00000940| 83 09 c3 48 89 1c 47 1d | c6 0d 21 88 0c 63 88 0e |...H..G.|..!..c..|
|00000950| 07 ad 8e c8 0d c2 5c 5c | c3 a5 21 88 c6 c2 21 88 |......\\|..!...!.|
|00000960| c9 63 2b 87 22 20 5b 66 | 31 20 72 69 6e 67 20 31 |.c+." [f|1 ring 1|
|00000970| 20 32 20 73 74 72 69 6e | 67 20 6c 65 6e 20 64 65 | 2 strin|g len de|
|00000980| 6c 65 74 65 2d 63 68 61 | 72 20 66 32 20 62 61 63 |lete-cha|r f2 bac|
|00000990| 6b 77 61 72 64 2d 63 68 | 61 72 20 31 32 34 5d 20 |kward-ch|ar 124] |
|000009a0| 34 5d 20 70 72 6f 76 69 | 64 65 20 68 61 6e 6f 69 |4] provi|de hanoi|
|000009b0| 5d 20 32 29 0a | |] 2). | |
+--------+-------------------------+-------------------------+--------+--------+