A EjemplosRacket/Juegos/ConwaysGameOfLife/vida.rkt => EjemplosRacket/Juegos/ConwaysGameOfLife/vida.rkt +112 -0
@@ 0,0 1,112 @@
+#lang racket/base
+
+(require racket/match
+ racket/unsafe/ops
+ racket/performance-hint)
+
+(struct dish (rows cols cur nxt) #:mutable)
+
+(define (make-dishv rs cs)
+ (make-bytes (* rs cs)))
+(define-inline (dishv-set! dv rs i j ?)
+ (unsafe-bytes-set! dv (unsafe-fx+ i (unsafe-fx* rs j)) (if ? 1 0)))
+(define-inline (dishv-ref dv rs i j)
+ (unsafe-fx= 1 (unsafe-bytes-ref dv (unsafe-fx+ i (unsafe-fx* rs j)))))
+
+(define (string->dish s)
+ (local-require racket/string)
+ (define rows (string-split s))
+ (define rs
+ (* 2 (length rows)))
+ (define cs
+ (* 1 (apply max (map string-length rows))))
+ (define cur (make-dishv rs cs))
+ (define nxt (make-dishv rs cs))
+
+ (for ([i (in-naturals)]
+ [r (in-list rows)])
+ (for ([j (in-naturals)]
+ [c (in-string r)])
+ (dishv-set! cur rs i j (char=? #\O c))))
+
+ (dish rs cs cur nxt))
+
+(define-syntax-rule (unsafe-between min x max)
+ (and (unsafe-fx<= min x)
+ (unsafe-fx< x max)))
+(define-inline (neighbors gv rs cs i j)
+ (let ([cnt 0])
+ (for ([di (in-range -1 +2)])
+ (let ([ni (unsafe-fx+ di i)])
+ (when (unsafe-between 0 ni rs)
+ (for ([dj (in-range -1 +2)])
+ (unless (and (unsafe-fx= di 0) (unsafe-fx= dj 0))
+ (let ([nj (unsafe-fx+ dj j)])
+ (when (and (unsafe-between 0 nj cs)
+ (dishv-ref gv rs ni nj))
+ (set! cnt (unsafe-fx+ 1 cnt)))))))))
+ cnt))
+
+(define (tick d)
+ (match-define (dish rs cs cur nxt) d)
+ (for* ([i (in-range rs)]
+ [j (in-range cs)])
+ (define alive? (dishv-ref cur rs i j))
+ (define ns (neighbors cur rs cs i j))
+ (define new-alive?
+ (or (and alive? (or (unsafe-fx= ns 2) (unsafe-fx= ns 3)))
+ (and (not alive?) (unsafe-fx= ns 3))))
+ (dishv-set! nxt rs i j new-alive?))
+ (set-dish-cur! d nxt)
+ (set-dish-nxt! d cur)
+ d)
+
+(module+ test-bench
+ ;; original: cpu time: 1843 real time: 1842 gc time: 36
+ ;; dishv-ref/set: cpu time: 1683 real time: 1682 gc time: 82
+ ;; neighbors: cpu time: 530 real time: 531 gc time: 0
+ (define (let-there-be-life s)
+ (define seed (string->dish s))
+ (collect-garbage)
+ (collect-garbage)
+ (time
+ (for ([i (in-range 10000)])
+ (tick seed)))))
+
+(module+ test
+ (require 2htdp/universe
+ 2htdp/image)
+
+ (define (draw d)
+ (match-define (dish rs cs cur _) d)
+ (define SCALE 10)
+ (define BOX
+ (square SCALE "solid" "black"))
+ (for*/fold ([img (empty-scene
+ (* SCALE cs)
+ (* SCALE rs))])
+ ([i (in-range rs)]
+ [j (in-range cs)])
+ (if (dishv-ref cur rs i j)
+ (place-image BOX
+ (+ (/ SCALE 2) 0.5 (* j SCALE))
+ (+ (/ SCALE 2) 0.5 (* i SCALE))
+ img)
+ img)))
+
+ (define (let-there-be-life s)
+ (big-bang (string->dish s)
+ [on-tick tick]
+ [on-draw draw])))
+
+(module+ test
+ (let-there-be-life
+ "OOOO....................O...........
+ OOOO..................O.O...........
+ OOOO........OO......OO............OO
+ OOOO.......O...O....OO............OO
+ OO........O.....O...OO..............
+ OO........O...O.OO....O.O...........
+ ..........O.....O.......O...........
+ ...........O...O..................OO
+ ............OO....................OO"))
A EjemplosRacket/Juegos/GUIAdivinaElNumero/info.rkt => EjemplosRacket/Juegos/GUIAdivinaElNumero/info.rkt +3 -0
@@ 0,0 1,3 @@
+#lang info
+
+(define compile-omit-paths '("ufo-source.rkt" "new-ufo-source.rkt"))
A EjemplosRacket/Juegos/GUIAdivinaElNumero/new-ufo-source.rkt => EjemplosRacket/Juegos/GUIAdivinaElNumero/new-ufo-source.rkt +1166 -0
@@ 0,0 1,1166 @@
+#reader(lib"read.ss""wxme")WXME0109 ##
+#|
+ This file uses the GRacket editor format.
+ Open this file in DrRacket version 7.8.0.1 or later to read it.
+ Most likely, it was created by saving a program in DrRacket,
+ and it probably contains a program with non-text elements
+ (such as images or comment boxes).
+ http://racket-lang.org/
+|#
+ 33 7 #"wxtext\0"
+3 1 6 #"wxtab\0"
+1 1 8 #"wximage\0"
+2 0 8 #"wxmedia\0"
+4 1 34 #"(lib \"syntax-browser.ss\" \"mrlib\")\0"
+1 0 36 #"(lib \"cache-image-snip.ss\" \"mrlib\")\0"
+1 0 68
+(0
+ #"((lib \"image-core.ss\" \"mrlib\") (lib \"image-core-wxme.rkt\" \"mr"
+ #"lib\"))\0"
+) 1 0 16 #"drscheme:number\0"
+3 0 44 #"(lib \"number-snip.ss\" \"drscheme\" \"private\")\0"
+1 0 36 #"(lib \"comment-snip.ss\" \"framework\")\0"
+1 0 93
+(1
+ #"((lib \"collapsed-snipclass.ss\" \"framework\") (lib \"collapsed-sni"
+ #"pclass-wxme.ss\" \"framework\"))\0"
+) 0 0 43 #"(lib \"collapsed-snipclass.ss\" \"framework\")\0"
+0 0 19 #"drscheme:sexp-snip\0"
+0 0 29 #"drscheme:bindings-snipclass%\0"
+1 0 101
+(2
+ #"((lib \"ellipsis-snip.rkt\" \"drracket\" \"private\") (lib \"ellipsi"
+ #"s-snip-wxme.rkt\" \"drracket\" \"private\"))\0"
+) 2 0 88
+(3
+ #"((lib \"pict-snip.rkt\" \"drracket\" \"private\") (lib \"pict-snip.r"
+ #"kt\" \"drracket\" \"private\"))\0"
+) 0 0 55
+#"((lib \"snip.rkt\" \"pict\") (lib \"snip-wxme.rkt\" \"pict\"))\0"
+1 0 34 #"(lib \"bullet-snip.rkt\" \"browser\")\0"
+0 0 25 #"(lib \"matrix.ss\" \"htdp\")\0"
+1 0 22 #"drscheme:lambda-snip%\0"
+1 0 29 #"drclickable-string-snipclass\0"
+0 0 26 #"drracket:spacer-snipclass\0"
+0 0 57
+#"(lib \"hrule-snip.rkt\" \"macro-debugger\" \"syntax-browser\")\0"
+1 0 26 #"drscheme:pict-value-snip%\0"
+0 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0"
+1 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0"
+2 0 55 #"(lib \"vertical-separator-snip.ss\" \"stepper\" \"private\")\0"
+1 0 18 #"drscheme:xml-snip\0"
+1 0 31 #"(lib \"xml-snipclass.ss\" \"xml\")\0"
+1 0 21 #"drscheme:scheme-snip\0"
+2 0 34 #"(lib \"scheme-snipclass.ss\" \"xml\")\0"
+1 0 10 #"text-box%\0"
+1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0"
+1 0 1 6 #"wxloc\0"
+ 0 0 120 0 1 #"\0"
+0 75 1 #"\0"
+0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9
+#"Standard\0"
+0 75 6 #"Menlo\0"
+0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 2 24
+#"framework:default-color\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 15
+#"text:ports out\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 255 0 0 0 0 0 -1
+-1 2 15 #"text:ports err\0"
+0 -1 1 #"\0"
+1 0 -1 -1 93 -1 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 17
+#"text:ports value\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
+-1 2 27 #"Matching Parenthesis Style\0"
+0 -1 1 #"\0"
+1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
+-1 2 1 #"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 37
+#"framework:syntax-color:scheme:symbol\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 38
+#"framework:syntax-color:scheme:keyword\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2
+38 #"framework:syntax-color:scheme:comment\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 37
+#"framework:syntax-color:scheme:string\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 35
+#"framework:syntax-color:scheme:text\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 39
+#"framework:syntax-color:scheme:constant\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 49
+#"framework:syntax-color:scheme:hash-colon-keyword\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 42
+#"framework:syntax-color:scheme:parenthesis\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36
+#"framework:syntax-color:scheme:error\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 36
+#"framework:syntax-color:scheme:other\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 16
+#"Misspelled Text\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2
+38 #"drracket:check-syntax:lexically-bound\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 28
+#"drracket:check-syntax:set!d\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 37
+#"drracket:check-syntax:unused-require\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36
+#"drracket:check-syntax:free-variable\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 31
+#"drracket:check-syntax:imported\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 47
+#"drracket:check-syntax:my-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 50
+#"drracket:check-syntax:their-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 48
+#"drracket:check-syntax:unk-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2
+49 #"drracket:check-syntax:both-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2
+26 #"plt:htdp:test-coverage-on\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 2 27
+#"plt:htdp:test-coverage-off\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 4 1
+#"\0"
+0 70 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 4 4 #"XML\0"
+0 70 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 2 37 #"plt:module-language:test-coverage-on\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 38
+#"plt:module-language:test-coverage-off\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 93 -1 -1 0 1 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 0 36
+#"mrlib/syntax-browser:subtitle-color\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 1 0 0 0 0 0 0 36 36 140 255 255 255 -1
+-1 0 42 #"mrlib/syntax-browser:focused-syntax-color\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 1 0 0 0 0 0 0 34 139 34 255 255 255 -1
+-1 0 1 #"\0"
+0 75 23 #"Lucida Sans Typewriter\0"
+0.0 12 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0 255
+255 255 1 -1 2 1 #"\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 2 1 #"\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 38 38 128 0
+0 0 -1 -1 2 1 #"\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 194 116 31 0
+0 0 -1 -1 2 1 #"\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 41 128 38 0
+0 0 -1 -1 2 1 #"\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 132 60 36 0
+0 0 -1 -1 2 1 #"\0"
+0 -1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0"
+0 -1 1 #"\0"
+1.0 0 90 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 4 1 #"\0"
+0 -1 1 #"\0"
+1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 0 164 0 28 3 12 #"#lang racket"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 17 3 19 #";; as proposed by: "
+0 0 24 29 1 #"\n"
+0 0 17 3 42 #";; https://github.com/racket/realm/pull/6 "
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 7 #"require"
+0 0 24 3 1 #" "
+0 0 14 3 14 #"2htdp/universe"
+0 0 24 3 1 #" "
+0 0 14 3 11 #"2htdp/image"
+0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 24 3 1 #" "
+0 0 14 3 5 #"WIDTH"
+0 0 24 3 1 #" "
+0 0 21 3 3 #"200"
+0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 24 3 1 #" "
+0 0 14 3 6 #"HEIGHT"
+0 0 24 3 1 #" "
+0 0 21 3 3 #"300"
+0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 17 3 86
+(4
+ #";; depending on your settings, drracket may claim that the image cau"
+ #"ses a syntax error"
+) 0 0 24 29 1 #"\n"
+0 0 17 3 50 #";; please ignore this warning and click RUN anyway"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 24 3 1 #" "
+0 0 14 3 12 #"IMAGE-of-UFO"
+0 0 24 3 1 #" "
+0 2 51 21 1 #"\0"
+2 -1.0 -1.0 0.0 0.0 0 20 500
+(5
+ #"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0R\0\0\0L\b"
+ #"\6\0\0\0\376\360\340p\0\0 \0IDATx\234\325\234{xU\325\231"
+ #"\377?k\357}N\2\344$(\243@\b$@\270\204pS\2\201\4\345\"\3"
+ #"Hg\254\27$\240Vj\305bGTh\265t\36ujUd\252X\25gZ"
+ #"\253E\4\5\271(:S\225K\324i\25\310\5\224\221\204\204\200U.!A\253"
+ #"\220;\3119{\3575\177\354\275V\366\tP\261\322>\277\337z\236<'{\237"
+ #"}\326\345]\357\345\373^\326\26RJ"
+ #"\311\267i\22\220\22\27\257\e\3030\274"
+ #"\333R\"\204\0\300q\34L\303\4\240"
+ #"\252\242\202\342\342bJ\212\212\251\254\254"
+ #"\344Xm\rRJ\357\31\323DJ\211"
+ #"\224\222n\335\272\221\231\231\311\270\374|"
+ #"\6\16\34\310\264i\323\300\357\317u\34"
+ #"\f\323\304u\0340D\334\230\352\31oj\22A\3735\320~%;\336\370vM"
+ #"|[B\272\266\343-\304\20q\304s]W/\260\241\241\201\215\3537\360\322K"
+ #"/q\344\320!\217`\216\2130\rl\333\306\262,\204\208\216\203eY\330\266"
+ #"\r\200i\232\330\256\vxD\232={6\23'Nd\332\364\3518\266\215iY"
+ #" \274\261\300\333D7@\274\377\257\b"
+ #"\251\232\"\242&\246\353u\373\37\377\361"
+ #"\37<\367\334s\264\264\264\340\272.BJ\\\327%\34\16k\302\305\34\a\307q"
+ #"\20B\350?5-\3234q]7\216Xiii\334}\367\335\\}\365\325H"
+ #"\321\376\214\224\22\323\3648\277\343\242\316"
+ #"\23\275\316\332\316\v!\245\224\330\266M"
+ #"(\24\322\242\371\311\201\203,Z\264\210\262\2622B\241\20B\bN\235:ER"
+ #"\347\316\244\244\2440r\344H\206\215\30A\217\36=HOO\327}"
+ #"\225\227\227\323\334\334\314\316\235;\331"
+ #"\277\177?'N\234\320\304\1\237\353"
+) 500
+(6
+ #"|n\0374h\20\17>\364\vF\215\32u\232Jq\244\353m\212O\302\377\347"
+ #"\t\31\24g\357\6\24n\333\306O\357"
+ #"\271\207\306\306\306\323\26xiN\16\353"
+ #"\326\255\363\256\375\357\\\351b\b\343\364"
+ #"\276]\227O?\375\224\265k\327RXXHuu5\256\353bY\226\346X\327"
+ #"u\2317o\36\367\335\177\177{_\306\351}\375\255\333y\e\321q\34\\\327e"
+ #"\303\372\365,X\260\200\272\272:\300["
+ #"\350\240A\203p\34\207X,\306\370\361"
+ #"\343\343\210\250XE*]\350\177\2\b"
+ #"\303 ##\203\a\376\355\337x\377\203"
+ #"\17X\263f\r\227]v\31\256\353\22"
+ #"\213\305\264\32x\341\205\27\230q\345\225"
+ #"4\324\327c\30\206&r,\26;_\313\373\332v^\b)\245\3044Lv\225"
+ #"\224\362\300}\367\341\3326\2460\270 "
+ #"\245+WN\233N\355\261\32,\313\322\"*\f\3\333\261Ax\e`\30\6\302"
+ #"4<\242\32\302\373\24\340\270\16f\310"
+ #"3(H\311\270\274<V\255Z\305\372"
+ #"\365\353\271\374\362\313\365\2,\303\340\300"
+ #"\201\3\214\37?\236\362\275e\b\tH"
+ #"\bY\241\363\261\274sj\337\232\220J"
+ #"\254\217\34>\314\355\267\337\216\3438H"
+ #")\211D\"\334u\327]l\336\274\231\372\372z\300#xnn.H\211eY"
+ #"\0\232\270\216\343\304\365\353\272n\374w"
+ #"\3768\206i2z\364h^^\263\206\177\375\327\177%99\31\333\266\221R\322"
+ #"\324\324\304\334\271s\251\252\252\302\361-"
+ #"\377\337\253\2353!\203:\251\343}!"
+ #"\4?\373\331\3178q\342\4\226e\221"
+ #"\222\222\302s\317=\307\362\345\3131M"
+ #"S\213\275\20\202\36=z@\300*\373\314\203a\232H\3327&\250\347L\323\324"
+ #"\\\nh\242\336:o\36\257\274\362\n\331\331\331z\36uuu\24\24\24\320"
+ #"\322\322B\334\0\201\271K)\203\267\317"
+ #"K\373\306\34)\204\210#\246\20\202-"
+) 500
+(7
+ #"[\266P\\\\L(\24\302u]~\363\233\337\260z\365j\276\372\352+\\\327"
+ #"%\377\262\361\08R\322\273O\37\34"
+ #"\333\326\270\361\333\266AYY\254[\267"
+ #"\216\261c\307jL\332\320\320\300\2349s\0_\347\372\250Bm\216v\24\334o"
+ #"?\276j_KH\205\317\24\a)\5\257\233\204%\17?\2429\357\246\233n\302"
+ #"0\f\266\275S\210\31\262\270\343\316\5"
+ #"\244\245\245!\245d\350\320\241^\37\246"
+ #"\241EW1Z\220\341\376b\353\370\3!\350\34\211\260v\355Zn\270\341\6\332"
+ #"\332\332\0\250\250\250\340\231\345\313\21>"
+ #"\\R\252DaR\1X\206y\226A\276y\373ZB\32\206\201\20\"\316\32\6"
+ #"\271r\333\326\255\32\226$%%\361\263"
+ #"\237\375\214\225+W\3428\16\221H\204\37\375\350G\354-/G\nAJJ\n"
+ #"\266c\353>\317\aG*\216C\b\226,YB~~>B\b\302\3410\313\226"
+ #"-c_y\271\2476|G\3000\214\277\t<\372F=\6=\16\325\376\353\277"
+ #"\376\v!%!\323\344G\363\347s\254"
+ #"\266\226\255\205\205\330\256\313-\267\336J"
+ #"\324\266\331\267o\37\226e\2213ft\34\256\f\2\355\277~\5\302sO\221\30"
+ #"\226\311o\177\373[\6\17\36Lkk+\341p\230\245K\227\"]\27\201\300\20"
+ #"\2066\206\35u\375\267\236\306\327=\240"
+ #"\6\325\306A\266\a'\352N\234d\363[o\21\16\207\211F\243\\}\365\325|"
+ #"\374\361\307\b!\270\360\302\v\231;w.eee$$$\320\26\213\306q`"
+ #"\234z\370\226M\0312\200\244\244$\236z\352)=\357\35;vPZZ\332\276"
+ #"`_\32:\352\372o\333\276\226\220J"
+ #"\254\203\vW\304\374\303\37\376@(\24"
+ #"\"\332\332\306\320\241CI\355\335\233\35;v\20\213\305\03036\227"
+ #"\244\344\b\a>9Hk\264\r\3234\351\337\277\277v\361\24\326;\353"
+) 500
+(8
+ #"\337\3274\375\230\20\b#\300iH\372"
+ #"e\366g\361\342\305\232`\253V\255\362\304?0w\340\274\212\3709qd\220\e"
+ #"\203A\205\235;wz\273j\b\n\n\n\08z\364(\241P\210!\203\2630"
+ #"\f\203\372\223u:<\326\275{w\244\224\336\2\204\320\213;\37\3154M=7"
+ #"\3234\371\227;\356\240{\367\356\0l"
+ #"\336\274\231\332\332Zd \"\365w\27"
+ #"\355\216zQ @\202\23\263\251\254\254"
+ #"\304\5\244\20\f\312\312\2)\251(/\307\0\32\353\353ijhd\370\320\241\b"
+ #"\t\6\2S\30:\366\330\321\213\371\246"
+ #"\346;\370\250\354\0\307T[\264h\221"
+ #"\276\367\366\333o{n\251\4\\\2517"
+ #"\367|\265s\342\355\270\360\30^`\325\n\205(++\323\242?j\324(\20\202"
+ #"h4\212\224\222\225+Wr\371\370\361\374\352W\277\"d\232\332\3730\fC\e"
+ #"\231\363\305\25\301\0002\240\343\231\327]"
+ #"w\35)))\200\247\206\220\322\v\6"
+ #"\237G\375\254\3329\341\3108\303 \300"
+ #"\260L\216\34>L(\24\302v\35\322\372\364\326A\210\326h\224\250m\203ap"
+ #"\262\276\236\362\212\n\332b1B\241\220"
+ #"\326\217\252\337\363\241\243\202\\\245\324\220"
+ #"eY\340\aF\276\373\335\357\2\260s\347N\20\2\303\362\274$\333w\n\316W"
+ #";'\321V-\310A\307\217\37\327\351"
+ #"\201\213/\276\330\333i`\352\324\251X"
+ #"\226\2457@\375\336\266m\252\252\252\364"
+ #"\365\231\240\324_\323T?\232\200\201f"
+ #"\307b\334x\343\215\372\272\262\242B\217"
+ #"\31\f\305\235\217f\235\355\2133\rq\246\35\224R\322\251S'\f\313\213R?"
+ #"\367\374\363\270\216\303\247\237~\312\27_"
+ #"|ASS\23\a\17\36\344\343\262\275"
+ #"\204\22\302q\204<\215\333\377\312\246"
+ #"\221\200\277q1_\2\254p\210\376\375\373\23\211D\250\253"
+ #"\253\243\266\266\226\301C\262\364\274O\213\245~\213vVB"
+) 500
+(9
+ #"\252\26\\8x1>\3234INN\366&\343J\206\r\e\246\27\204\364\2\20"
+ #"\231\3\6\220\231\231\tB0u\332\264"
+ #"\270\200\253Z\300\371\22m\325\227\362\265"
+ #"\203\221z\3034\311\316\316f\367\356\335"
+ #"\224\225\2251\376\362\313\b\207\303q\321"
+ #"\245\363\321\364J\316\6\343:\262\277\322"
+ #"u\203\a\17\3064\315\270\211\273\256\e"
+ #"oN}\253\254\334\302\340\302\243\321\350"
+ #"yY@\320\325T\342*\245\324\236\214t]\362\362\362hkk\243\246\246\206p"
+ #"8\fp^\211\b\337\20\376\0041eee%\256\353j\v\t\361\251X\365\31"
+ #"\f\30(\5/\245\324\v\372\266\255#g\305\aTd\\\320b\303\206\r\354\337"
+ #"\277_\317\345|\266\263\0222\b\347\224"
+ #"\221\21Bx\36\211\353\5Q\205\360\260aIQ1\2\201t\332\237\323\317\a\240"
+ #"I\320\30t\264\266\35\357\5\r\333\231"
+ #",\263^@\207\315C*\254\333\376\234\341{>\246i\362\223E?\306\265\35,"
+ #"\323B:n\34\212\b\372\340\337\24\232\235\223g\23L\334#\4\b\301[o\275"
+ #"\245'ZRR\302\304\t\23x\350\241\207\250\254\254DJ\251\363%B\bl\333"
+ #"\216K\253v\f\305\0057J-(\b\225:\266\263\341F\360\300\271t]\20\202"
+ #"\17?\374\220{\357\271\207\307\36{L"
+ #"\253\237\252\252*\236}\366Y\315\255*"
+ #"\252\25\374\204v\342\237k\373\332,\242\266l\22\235\224/-)aNA\201\a"
+ #"s@GZ\324\2SSS\231\361O\337\341\322K/%77\227\344\344\344v"
+ #"\2\250h\265_-\21$\2008\233\361QST\304\17^\253\375\360+>*+"
+ #"+\331\264i\23\205\205\205|\366\331g"
+ #"\232\200\35+9\236x\342\t\256\271\346"
+ #"\32]\330\0204|\177\2155?\247t\254\224\22\\o\a\367WV2"
+ #"g\316\34\232\e\e\275@A \251\257R\n\226ea\273\216\16v\f"
+) 500
+(10
+ #"\36<\230\361\343\307\223\225\225E\257\236"
+ #"\251\214\0313&\236(Bh7\317s\343\274{\35\211\r\361\4w\35\207\222]"
+ #"\245TTT\260\253\244\224\235;w\322"
+ #"\334\334\254\t\247\210\b\304I\202\353\272"
+ #"t\355\332\225u\353\3261(k\260\356;\350$(}~\256F\351\353\t\351z"
+ #"\213rl\233\326\326V\n\256\277^+"
+ #"l\245\350U\30\337\262,\f\313\242\265\265\3654\221Q\331B\307qHHH\240"
+ #"W\317\236\364\354\331\223\224\v. 33\223\204\204\4\0F\215\32\245\rRB"
+ #"B\2\321h\224\312\312J\32\e\e\1"
+ #"\250\256\256\346\310\221#\324\326\326R]"
+ #"]\215i\232Z\215\204B!\242\321("
+ #"\246ib\20\357\225E\"\21\232\233\233"
+ #"\365=\27\350\322\245\vk\327\275\242#\367jM\360\315#C\347DH\327u1"
+ #"L\223\eo\270\201\322\342\342\270$\275\"\214\2023Q_\37\6\243DJT,"
+ #"\313\322\\+\35\207\304\304DZ\243Q]\276\22\213\305HLL\324\375*q\f"
+ #"\352+e\260\324\306D\243QB\241\220\276\a~$\310\37s\362\344\311\\t\321"
+ #"E\224\225\225\261w\357^-\336\256O\370\36\251=y\363\3157INN\326\343"
+ #"E\3759}\0237\366\353\t\351\353\236g\236y\206'\236x\2\323gw\333\266"
+ #"IOO'o\3548F\215\32E\237\214t\366\356\335\313\251S\247\260,\213S"
+ #"mm\24\27\27#\204\240\245\245\205\275{\367\2\20\362s;AoDO\306W"
+ #"\17*\211\246\200v[[\233\306\254\321"
+ #"h\24\327u\265\330\n\277?E\310\313"
+ #"\307\217g\350\320\241\344\344\344\220\224\224"
+ #"\304K/\275\304\326\255[\265\21S\4"
+ #"\222R\322\275gO\216\325\326\220\345'"
+ #"\320\224.\17n\324\271\352\312\2577"
+ #"6\216\313\273\357\276\313\374\371\363=\v\356/VY"
+ #"a%\272iiiz\1C\206\fa\314\330\261\212:"
+) 500
+(11
+ #"q\306\241\346\350Qjjj\20BPVVFKK\v\261X\214\346\346f*"
+ #"++\1t\35\221\212\30%&&j\2&$$`\3336)))\f\36<"
+ #"\30GJ\306\215\eG$\22aHv6\322uy\355\265\327\330\364\352\253\354\332"
+ #"\265K\317\321q\34:u\352Dss3)\27\\\300\262e\313\0307n\34\371"
+ #"\371\371445jbF\"\221\277\312\353\21\216\343\3108_\25O\361\v\37\346"
+ #"4\326\3251y\362d\376\374\325W\204"
+ #"\303a\275\270\240n\354x\255\210<f"
+ #"\314\30/r\236\232\312\340\301\203\31\227"
+ #"\227\27oT\316\270s\3615\216\02000\301=W\e$\4\307\216\34\241d\327"
+ #".JJJ\330\262e\vu\r\365\204"
+ #"L+N\324\225\212\271\376\372\353\271\363"
+ #"\356\273HKK\303u]\336-|\207\371\363\347c\30\6\3\6\f`\303\206\r"
+ #"D\222\223\333i`\304g\6\224\261R"
+ #"\353\326\230Yq\244r\364\235\230_\233"
+ #"\350\353\242\233\346\314a\347\316\235\b_"
+ #"\251\257X\261\202\264\2644Jv\225\352"
+ #"\202\321F\337\202\207B!\255\353\202\336"
+ #"L8\34\326\vQ\5\244\303\207\17'"
+ #"11\221\364\364tz\365\352\205\224\222"
+ #"\254\254,R\272v\215\263\3142 \376UUU|\365\325W\264\266\266RVV"
+ #"FUU\25\373\312\3128~\37481?\325\200!\264\v\332\271sg\234\230\315"
+ #"\324\251S\311\315\315\345\272\353\256\243s"
+ #"R\27\217\260\2128\266\303\322\245KY\261b\5\206a0p\340@\326\256]K"
+ #"\327\v.\3607\f\355\303\307\357w<"
+ #"D\22\266m\313\270\20\224\333\316\21\253"
+ #"^|\221\207\37~X\3\352Y\263f"
+ #"\261\364\337\377\35\3600\245\322!\225\225"
+ #"\225\224\227\227SZ\352A\220?\377\371\317\332zv\4\344\352:H\350N"
+ #"\235:\341\272.\321h\224\304\304D\315\365g*Z\r\246U]\327\305\362"
+) 500
+(12
+ #"9\303\305\263\264R\300\2301c\310\317\317'''\207qc\307\305cT\177\355"
+ #".\336\306\232\276OR0k\26\377\373\277\377K4\32%;;\2337\337|3"
+ #"nc\202\\\330\21w\306q\244V\225>^\254>z\224\0313f\320\320\320@"
+ #"(\24b\320\240A\254Z\265\212\v/"
+ #"\274\360\314b\31\20\311\243G\216p\340"
+ #"\300\1v\356\334IEE\5\245\245\245q\304P\6DY\350`\205nGoF"
+ #"Eu\224\341\tFy\0\34\237\373S\323\322X\260`\1\323\256\234NRRR"
+ #"\273{(\f\215G\245\353U\tK)\261]\317M\24\2761mjj\"//"
+ #"\217z\277\242m\326\254Y\374\362\261\307"
+ #"t\324J\365\27\334\334\240\207&\\\327"
+ #"\225\"`@\220\2368\315\2313\207]\273v!\245W\20\265q\343F\6\16\32"
+ #"\344u\342\213\221\22\177MD)qd\273\242\16b\262\3\a\16\360\361\307\37S"
+ #"}\344(\245\245\245\324\324\324p\364\350"
+ #"Qm\251\2255U\225\273\212\350\312G"
+ #"W\367\0254\2320a\2\231\231\231\374\341\275\3678|\3700c\363\362X\263v"
+ #"-\222\370\5+\324\341\337l/#\304+\2156\244\320\22\366\321G\37QPP"
+ #"\240\261\351\254Y\263xl\331\343z\343"
+ #"\224\312:\223%\327\202\257\223A\256d"
+ #"\323\246M\24\25\25\351J\333;\357\274\223\236={\362\264\237/NOO\247w"
+ #"\357\336\\r\311%~\35\267\320\0235\rSsY0.8p\340@\6\f\30"
+ #"\240\3\n\312s\251\252\252\242\241\241\201"
+ #"\206\206\6***\342*r\25\361,\313\"11\221\354\354l.\274\360B\6"
+ #"\16\32D,\32%\24\16s`\377~>\375\364SoCl\333+\3\244\35\276"
+ #"(\tS\3042C>A\264\327\343\315\307\264,F\217\31\303\3\17"
+ #"<\300\243\217>\212\20\202\215\e7\202!x\354\261\3074\266\fr"
+) 500
+(13
+ #"c\374\206I)c\261\230T\255\356\304"
+ #"Iy\371\370\313d\277\214\276\262oz\206\274\355\326yR\272Rnz\3655\331"
+ #"'\255\267\276\2377v\234\34\320?S"
+ #"~\347\312\31r\305\363\277\223\315\215M"
+ #"\322\216\306\244\3438\272/\327u\365\377"
+ #"\261X\314\273v\245\367\347x\377\273\266"
+ #"\243?\355h\254\375\373\3003\372\263\343"
+ #"}W\312\357\315\271A\16\352\237)g"
+ #"\315\274\336\353K\312\3709\330\216,\332"
+ #"\261S\26\355\330)\245\333\376\235\355:"
+ #"^\27\376\370N\314\226N\314\226\322\225"
+ #"\362\266[\347\311\276\351\31\262\177\337~"
+ #"\262w\357\336\362\265\327^\323\375\272\256"
+ #"\e\327\277jV\307\2\243\325\253Ws"
+ #"\344\310\21\f\303 \22\211\260l\3312"
+ #"\0\266l\331\202i\232D\"\21\326\257_\317\200\1\38p\340\0\5\5\5<"
+ #"\372\350\243\254\\\271\222\347\237\177>."
+ #"\224\177\246\20Z\375\311:\336y\347\35"
+ #"\216\35;\246\277\378p \323\246O\307\fZj\225\373\3669=\b\201t\337"
+ #"R\352\254\245i\232\232\363\224Zx\370"
+ #"\341\207y\361\205\225\332[Y\273v-"
+ #"y\343\363\365\374\20^A\227t\3348\237~\331\262e\\u\325U\34>|\30"
+ #"\313\262\270\347\236{p]\227\2313g"
+ #"\306qa\234\345\326;\354\270\262\271\261"
+ #"I\16\313\36*3\373\365\227}\3233"
+ #"\344\326\315[\364\356\217\0306\\\366\357"
+ #"\333O\256\177e\235\3369'f\313\25\317\377Nf\366\353/{\367J\223\23/"
+ #"\237p\32'\252\235\334\277\177\277\2347\317\333\351~\31}eF\237t\3317="
+ #"C\16\350\237)3\372\244\313\331\263\n4W+nS\334\"\343\273ko\256\224"
+ #"s\256\237%\373\247g\310\ef\317\321"
+ #"\34)\245\224O<\361\204\354\333\327\223"
+ #"\236\364\336}d\377\276\375\344O\357\271W\317Mqd\307"
+ #"y\252VYY)\373\364\351#\373e\364\225\3752\372\312\221"
+) 500
+(14
+ #"\303G\310\212\362}z>j\236\252?C\e\n!\370\315o~Css3\0"
+ #"\223'Of\252\177Hh_y9MMM\244\246\2462\253\240\200\367\336{\217"
+ #"\202Y\263X\260`\1\343\306\215#\26"
+ #"\213\321\251S'\376\364\247?y\230\323"
+ #"\2078\252\275\376\372\353\374\343?\376#"
+ #"\357\276\373.\206a\320\263gO\362\363"
+ #"\363\311\316\316\246\265\265\225P(DI"
+ #"I\t\17<\360\0\246e\351\214\244\374"
+ #"\272\300\224 \316\215\23\206\241\3\30o"
+ #"\274\361F\34T\261m\233\275{\367\352"
+ #"g\ra\340\312\366\302S\305\311\3527"
+ #"\375\372\365\343\221G\36\321\327\365\365\365"
+ #"\24\24\24\320\334\324\4\264\343l\335\237"
+ #"\224\22\244\244\271\251\211\325\253W\343H"
+ #"\27\27\311\277=\370sO\17#\251:x\0)%s\347\316\305u\34V\256\\"
+ #"\311\356\335\273\331\274y3\315\315\315\344"
+ #"\346\346\322\326\326F8\34n\307w~J\266\270\270\230\305\213\27cY\26II"
+ #"I\254[\267\216\367\337\177\237\227_~"
+ #"\231\337\377\376\367\354\332\265\213\t\23&"
+ #"\0\360\332k\257\321\334\324\324\16\223:"
+ #"V\352\236\241)\243\244\274\230P(\304\341\303\2079z\364h\\4=\34\16S"
+ #"UU\245\t'\221q')\202\301e\351\373\3447\336x#c\307\216\3258\262"
+ #"\255\255\215[n\271\345\214\2456\206\322"
+ #"E\353\326\255\243\271\271\31\3030X\264"
+ #"h\21\275{\367\326\326\351\320\241C\270"
+ #"\256\313\214\03130L\223\334\334\\\204"
+ #"\20t\355\332\225\201\3\a\352\4X$"
+ #"\22a\364\350\321q\26m\343\306\215\332"
+ #"\372\336w\337}\344\214\36\355\23\310\223"
+ #"\202\356\335\273s\333m\267\3510\334\236"
+ #"={4\224R\234\371\227\232\353\272$&&\352k\307q\250\255\255\325DV\272"
+ #"\271\255\255\r!\204\376\24x\245\200J\317\5\1\266\341s"
+ #"\266a\30<\366\330c\244\244\244ho\251\264\264\224\345\313\227"
+) 500
+(15
+ #"\307\315AJ\211\241|\337\27_|Qc\3069s\346\304u\256\304g\353\326\255"
+ #"8\266\315-\267\334\302\332\227_\346m"
+ #"?\374\324\324\324D,\26\343\316;\357\3044L\235\277\21\b>\257=\216k;"
+ #"\244D\222)\230U\300\373\177\374#O?\365\24\313\237~\232\222\342b\bx>"
+ #"\266m\363\341\207\37\342\357\302iA\335"
+ #"35\333\266u(\315\t\304E\25\207)0oY\26iii$$$x\321"
+ #"\37\377x]\307*;\305\301\n\272\245\246\246r\367\335w\307q\352SO=\305"
+ #"\276\362\362\270\2156\204a\260s\307\16jjj0\f\203[n\271\205n\335\272"
+ #"\305\351\247H$\202i\232<\370\340\203"
+ #"|\377\373\337\247\250\250\2101\343\306\321"
+ #"35\225M\2336\261g\317\36f\317"
+ #"\236\315\17~\360\3\17\224\373\223w\375"
+ #"\252\335p8\314\340\301\203q\35\207\262"
+ #"\2622\226/_\316\257\177\375k\257\214\4/U\321\326\326\26w\204\344\\O%"
+ #"(n\214\305b\230~\214\364\322K/e\371\362\345t\356\334Y3\204\224\222k"
+ #"\256\271F\353L\305\221p\272X\253\265"
+ #"\v\1773o\276\371f\306\216\35K(\24\322\34\275x\361b\275\321B\b,\244"
+ #"\344\367\277\377\275\6\321s\347\316\215\353"
+ #"\324u]\246O\237\316\243\217,\1`"
+ #"\307\216\35\24\27\27\343\304b\204\303a"
+ #"b\216\303\342\305\213\371\341\17\177\250E"
+ #"\322\264,\257\204\3164\2312e\n\2337o\366\26\208\341p\352\324)\255\e"
+ #"\267o\337\256k\320\225\316>\3270\226"
+ #"\2\312\312\270))\372\356w\277\313\224"
+ #")S\330\362\366f\252\253\253\31>|8\23'N\324\242l;6\226\331\36\210"
+ #"\b\226E\a3\211\302/xX\272t)\23'N\324\261\322\375\373\367\363\344\257"
+ #"~\305]\v\357\326\21y\336~\373mL\323d\346"
+ #"\314\231\\p\301\5q;b\232&\275z\365\212c"
+) 500
+(16
+ #"o)%\30\6#/\275\224\377\376\357\377\346\216\5\v\b\251<u\0\363I\327"
+ #"\345\272\353\256c\330\260a\224\226\226\262"
+ #"m\353V\256\275\366Z\246N\235\312\355"
+ #"\267\337\316\310\221#i\250\257\347\335w"
+ #"\337\325\v\354\331\263\247\327\307\327\247\222"
+ #"\0\257\244P\5;\364=\377\267\235:u\342\272\353gr\347\335w1q\342D"
+ #"\204\331N(\313\264\264\216\354\230\370\n"
+ #"\206\6\r\313\304\261m\32232X\270pa{\252\302\307\334mmm\236\241\333"
+ #"WV\256\275\225\302\255\333\342p`\20"
+ #"\17\272\256+\253\253\253eii\251\334"
+ #"\261c\207\254\256\256\216\373\256#\16\323"
+ #"\277u\245\334WV.G\f\e.\347"
+ #"\24\314\216\303\207G\17\37\221?\272\355"
+ #"\207\262\277\217-\373\246g\310\252\312\375"
+ #"\247{8g\303\221R\3129\5\263ef\277\376r\366\254\2\17\363\372c\a\347"
+ #"b\273\216\347\225H)\35\351JG\272\355]\a\326h\333v\273\363\24xF}"
+ #"\327PW//\35y\211\354\237\236!3\375\371>\371\344\223RJ)\255\335\273"
+ #"wc\3336\335\272u\343\212+\256\210"
+ #"\17Vv@\360\251\251\251\364\354\225\352"
+ #"}\207\360\16\273\273\3619\341 7\253"
+ #"6d\310\20\326\254Y\303\r7\334\300\200\314LRSSq\34\207\343\307\217c"
+ #"\370\317\306l\233>}\372x\376\270\342\2203\4yO\343H\331\236j\r\316U"
+ #"W\301\271\376\241{\277tF\211\263\353"
+ #"\237\2365\2k\364\316\207\373\301`\303\304\3613\241\22/\26\21IN\346{7"
+ #"\336\310\323O?\355\225\356H\311\v\277"
+ #"[\301\302\205\v1>\370\340\3:u\352\304\244I\223\20\276\22V\t/5@"
+ #"P\314\f\274j\v\341\377\337\361\20P\307\304\277J\326ggg\363\366\333o3"
+ #"j\324(\252\253\253\371\374\363\317\221R\322\26\213!"
+ #"E\373q\16az@Y\"\343+z\25\341\2\177\320"
+) 500
+(17
+ #"!\221/\374j\217\200V\260\fSW\365\206L\313?\341\0\24600h\257\e"
+ #"Rk\264\fS\237\2771\rSW\e\343z\272{\376\374\371\374\303?\374\203\256"
+ #">nnnf\323\253\257a}\376\371\347D\243Q\357\214`\200\v\214@0S"
+ #"\265\216\265\215\212\v\2039\234`\366\20"
+ #"\320\272R\30\6\275\322\322x\345\225W"
+ #"\330\275{7\e6l\340\350\321\243X\226E\227.]X\270p!YC\206h"
+ #"($\3160\376\231Z\20\374\3\332\222\6\347w&=\3301\300\254\232J\227\b"
+ #"\303\333P\323?Rb\32\246\247\317\v"
+ #"\v\261m['\344\\\327\365\274\271\276\351\31R\245\t\6\r\32D^^\36\223"
+ #"&M\"/\337w\356\225\341\240\235K\203nYP\25\304]\353X~{\254R"
+ #"\211i\\*\341\f\n?.\"\376\27\210(\200\t\227]NMu5\227\346\344"
+ #"\260~\303\206\323\3074\332\v]\203D"
+ #"\323\225\27\216\n\220\304\367\255\326\321\320"
+ #"\320\300\266m\333(\334\272\215m\333\266"
+ #"\221\340\247S\224Js\221\364\351\323\a"
+ #"\321'\255\267T\271\26\25\223T\377\347\344\3440r\344H.\271\344\22F^z"
+ #"\211w 3\260\330\216ER\200\16\212"
+ #"\206\254P\\\245\204\312\275H)\343\253"
+ #")d{\332@E\211\202\233\364\227t"
+ #"\244\0\372\367\355\207\220\222\321\271\271\254"
+ #"]\273\366\364\350\275\210'\\p\376\200v\23m\307#t}}=EEE\354"
+ #"\336\275\233\242\242\"]\f\201\353Wo\3700M%\327\244\360\346i%\6`\213"
+ #"\23\213a\370\356^,\26\343\243\217>\242\264\264T;\375]\273v%++\213"
+ #"\334\334\\\6\f\30@\267n\335<_\3240\364[T\3249i\375\362\16\342\353"
+ #"|4\367*\230\344\377\68s\211\311Y\311\330N\240\220i\22V"
+ #"\e \343+\333\324\247i\232\330Q/\240\v $\324\326\326r\354\330"
+) 500
+(18
+ #"1\266o\337\316\227_~\311\236={\330\267o\237N\371\6\363M\226\357J+"
+ #"H\250\360\253\24\276zq\34\a\333\266"
+ #"\2313g\16\333\266m\243\256\241A\357"
+ #"\226\2\310*\305\332\324\324Dii)"
+ #"\312\322+\361\353\325\253\27\275{\367f"
+ #"\350\320\241t\356\334\231q\343\306!\204 ''\307\3\271\1NP\4\356X\303"
+ #"\243\237q%\230\347X\315+!\301/S\321\271\236\366\2105\30208\260\177?"
+ #"\365\365\365\372]\31\25\25\25|\365\325"
+ #"W:\247\256@\270\342X\225\326P\322"
+ #"\241\270\370\256\273\356\242\242\242B\307e"
+ #"U\256\335\260<)\26\375\372\244K\303"
+ #"0\330\260a\3\227\\r\t\243G\217\346\344\311\223$%%a\232&_\2368"
+ #"Abb\242V\256Jw\4+!\202\245x\212{\225\247\0020|\370p\272t"
+ #"\351\202\224^2_\345hF\215\32\245\263\200\206a0j\364h_\257\31\361\271"
+ #"\354``\327'\22BPR\\\314\367n\274\21\307q\350\335\2737C\206\f\341"
+ #"D]\235.6P\343+)Pj\307\262,P\336\213\177_1M(\24\"'"
+ #"'\2071c\306\360\3143\317hxv\340\340A\0&O\232\304\221#G<\344"
+ #"\"\204\316QY\212\375\17\35:\304%99\234<y\22!\4#F\214\340?"
+ #"\377\363?Y\375\362\313\274\374\362\313\34"
+ #"?~\234H$\302}\367\335\307\214\0313\330\260a\3K\226,\211\263\262\301l"
+ #"\237\312\331\0|\364\321G:\315ZRRB(\24\242\265\265\25\3234u\345\206"
+ #"R'*x\21V;\356\e\266\324\324TRSS\343\364rii)\216\237\217"
+ #"?|\370\260W\374\337\322\322^\316\342"
+ #"\213\241\364]\335\240\21Se/\327^s\r\223'O\346\275\367\336\343\325W_"
+ #"\245\255\255\215\265\257\274\202\3538\224\226\226\262\343"
+ #"\203\17\350\327\257\237\17\255\34\372\364\351\303g\237"
+) 500
+(19
+ #"}F\330\362\216\306([b]x\341\205\2348q\202\247\237~\232\334\334\\\35"
+ #"B\262m\233\244\224\24\376\345\216;("
+ #"\332\261\203/\276\370\202\207\36z\210\253"
+ #"\256\272\n\204 --\r\333\266\271\354"
+ #"\262\313X\272t)\217<\362\b\0\177"
+ #"\374\343\379u\352\24\371\371\371\324\327"
+ #"\327SUU\245_\212\244\240H4\32=\255\34Z-Lg\rc1\317\177\365"
+ #"qhMu5\265~z\"\230QT\276\257eY:&\252\22_Rz\5\257"
+ #"RJ\362\363\363=\320-\204W\312\2\\u\325U<\366\370\343 \2456*!"
+ #"\323\4\377\367\226a\320\271sg>\373"
+ #"\3543Z\374\n\345\17>\370\300\e\323"
+ #"\207W\266m3\355\312+\261\6\r\32\304\316\235;\251\256\256f\322\244I:a"
+ #"\257\224tmu\265\367\343\204\4.\273"
+ #"\3542\r+\312\313\313\t\207\303\354\334"
+ #"\271\223\324\324T\236\375\355o\371p\367"
+ #"n\336z\353-F\216\34\311\2325k\264\336\232;w.EEE\304b1\356"
+ #"\271\347\36\216\349\302\266m\333hll\214+jR\321mu\3326\350\255\270"
+ #"n\373K\227\244\224Z\227)X\223\231\231I\267n\335\30<d\b\271\271\271D"
+ #"\"\21^}\365U^\177\375u\\\327\325\\f\30\6\00333\t\205B\24\24"
+ #"\24h\375\2548_\0\370\\{\305\25W\260}\373v\22\23\23y\350\241\207\364"
+ #"\271t%q\341p\30\f\203+\256\270\2ktn.E%%\b\303\360Nl"
+ #"\tA\363\251S\224WT\360\306\353\257"
+ #"\223\223\223C\310\267b\37}\364\21WL\231\2BP[[\253E\3170M\354"
+ #"X\214\272\272:\r!t<QJ\266o\337\216\20\202>}\372p\347]w\1"
+ #"\360\270\257\347^{\365U\356\275\367^\\\327\245\250\250\210m\333\266"
+ #"\261b\305\n\252\253\253\351\22\211\320"
+ #"\322\324D\367\356\335\271\370\342\213\331"
+) 500
+(20
+ #"\263g\17\206a0b\304\b:w\356L^^\36\313\227/\307\266m\36z\350"
+ #"!rF\217\326D\260c1v\355\332E,\26c\302\204\t:\32\365Emm"
+ #"\234t\4\235\fE\244?\35<\310\241C\207())\321\317\255_\277\236P("
+ #"\244UP\347\316\2359u\352\24\377t"
+ #"\325U\244\365\351\2151c\306\214\323j"
+ #"\21\23\22\22hii\341\307?\3761"
+ #"\337\371\316wt\264\370\311'\237\344\266"
+ #"y\363(\334\266\215\256]\273\306y0V(Dyy9\226eya\376\200\25"
+ #"U\341\372\21#F`\307b\332mDJ\216\349\202eY\344\345\345\321\243G"
+ #"\17n\276\371fz\365\352\205a\30deeq\340\223O\330^T\304O\177\372"
+ #"S]\223y\377\375\367\263\346\225W\310"
+ #"\311\311\321\6\3050\f0\fl\237\253"
+ #"-\177\301\341p\230\356\335\273k\202u"
+ #"\351\322E\23\247\304g\240c\325\325\34:tH?3y\362d\346\317\237Oa"
+ #"a!@\\-\223\222\214\226\226\26\f"
+ #"\313\342_\26\334\341\2157`\300\0\322\323\3235\333*qILL$\26\213\321"
+ #"\324\324\244\27\260o\337>\366\357\337O"
+ #"aa!!\323$\344\e\231\202\2313\351\223\221Accc\273\213\25\0\322\221"
+ #"H\4)%\231\231\231\32\307)\"\253\232G\r\324\3\242\34\344\32\303\262p|"
+ #"\213\356(\367\317_\234\224\222X\207B"
+ #"T\31\250&\256\251\251\321uI\237\327\326\22\211Dhiia\305\212\258R"
+ #"\362\342\213/\306\275R\247S\247N\32"
+ #"\245(\343\231\234\234L]]\235\206JR\bf\316\234\351\5\254]\27\v!\370"
+ #"\376\367\277\2573f\252\272B\205\357\225"
+ #"\376R\360A\31\207 X\335\275{7\37\356\331C\260\335~\373\355\f\0312\4"
+ #")\275\272\32\3030\250\251\251\241\244\270X\303\235"
+ #"\234\234\34\212\213\2135N\305'\220Z\200\"\256\e"
+) 500
+(21
+ #"\300\263R\275\372\3060H\nD\300\v\v\vIJJ\342\177\376\347\177\30=z"
+ #"4\200\316\235\27\25\25QTT\344\255A\264\327\273777\363\3143\317h\316"
+ #"U\372WU\346\271\256KZZ\32c"
+ #"\306\214a\341\302\205<\374\360\303l\331"
+ #"\262\5\313\262\270 %\205\5\v\26hi\20\322\225\262\241\276\236\t\23&PW"
+ #"WG\3104\351\331\263'O<\361\4\345~\32\266\262\262R\357\306\276\312J\r"
+ #"\221\324\304\202\325a\nK\306\2\213\27B\350\311\202\27\325NHH !!\201"
+ #"\220i\322\320\320@RR\22C\206\f"
+ #"a\344\310\221l\337\276\235\362\362r\257"
+ #"<e\340@~\376\363\237\363\316;\357"
+ #"\360\344\223O\"$\334\265\360n*\312"
+ #"\367\221rAW\336y\347\35N\326\327"
+ #"\353\342\320\340\\\204\20\b\331\236j\205"
+ #"vWV!\t\327\327\217\301\310\370\233L\be\373\0\0\5cIDATo"
+ #"\276Icc#C\206\f!\342W\361664\360\317\377\374\317\34>|\30!"
+ #"\4\367\337\177??\270\365V\355\202\n"
+ #"?\272\311\352\325\253\371\305/~\241q"
+ #"\335\242E\213\2307o\36\211\211\211\b"
+ #"\313\2\307a\367\356\335\314\232=[sKvv6)\221\b\273v\355\212;\223"
+ #"\3428\16\246\317\331\352\35f\t\t\t:\232\34\364\247E B\243\374|e\221"
+ #"\r\303\320y\22%R\226az\257:\24\6\266\353\340\370R\24T)J\247{"
+ #"\265?\36q\6\r\32\304'\237|\242"
+ #"\365\234\326\357\206\301\343\217?\316\262e"
+ #"\313\250\255\255E\b\301\366\355\333\351\336"
+ #"\275\273\366\266\232\32\e\271\376\372\353\251"
+ #"\252\252\322P\352\3455k|\n\6\b\251\b0\343\312+\365Q`\3518\244\244"
+ #"\2440l\3300z\364\350A\325\301\203\224\225\225i\243t\335u\327\361"
+ #"\313_\376\222\34355L\237>\235\346\346f-\362S\247NePV\26"
+) 500
+(22
+ #"Rz\347^\32\32\32t\31\237\342\234"
+ #"\317>\373\214\232\232\2328\5\256DK\211v,\26\323\351V\r\215,\213\326h"
+ #"\224\204P\b\333m?\255\245tc\347\316\235\31>|8\351\351\351\\t\321E"
+ #"\344\345\345a\232&\267\336z+\r\r\rZ\264\225\1y\344\321G)((\340"
+ #"\331g\237e\351\322\245\230\246\311\265\327"
+ #"^\313\317\177\376s\"\311\311lX\277"
+ #"\236_\377\372\327\34;vL3\317\352\325\253\211D\"\355yw@H\307\225\b"
+ #"\201\35\213q\360\340An\272\351&\276"
+ #"\374\362K\22\3\370\316q\34\214@\314"
+ #"\357\361\307\37g\346\365\327kWm\365"
+ #"\312\225,Y\262D'\321\23\22\22\370"
+ #"\345\343\217s\365\325W\353W\270\6\375\355\270k\25\5r\34***8u\352"
+ #"\24\255\255\255$$$\264G\255m;\216X\312K\t\236x\310\310\310\360\254s"
+ #"\300\177oll\344\221G\36a\323\246Mz\35\t>\367^t\321E\274\364\322"
+ #"K\f\314\362j\225\32\352\353\271\374\362\313iii\211{\5\231r+M\323\244"
+ #"S\247N\254[\267\216\241\376i`Uo\t\201\372H\2447\370\eo\274\301\275"
+ #"\367\336\253\aNLL\244\245\245E\347\203\227-[\3065\327\\\243\337&e\b"
+ #"\3\307\266\371\336\367\276GII\2116"
+ #"J\261X\214i\323\246\261l\3312\222\"\221\270hP\\\23g\177\233@0:"
+ #"\337\21\367\351\337\370\25\306\266\277XE"
+ #"\310\247\237z\212U\253Vik\254\346\345\272.999\274\360\302\v$&&"
+ #"z}\370\277\177\351\245\227x\360\301\a"
+ #"\265[\31L\202\365\357\337\237U\253V"
+ #"\321\275G\217\370\265\210\366\311J\327u"
+ #"u\302\311\211\331\262p\35369\341\262\313ef\277\376:)5>/_V\224"
+ #"\357\323\5T:\341\345_\327\237\254\223\323\247N"
+ #"\323ER}\3233d\337\364\fy\311\210\221r\305"
+) 500
+(23
+ #"\363\277;\2550\312\265\35\357\267\35\22P\321hT\376\245f\333v|\262-P"
+ #"\320\324\334\330$7\256\337 \363\307\345\351\361U\21TF\237t9tH\266|"
+ #"\341w+NK\254\271\266\243\213\305\236yz\271LK\355%\af\16\220}\323"
+ #"3\344\210a\303\3453O/\227\365'\353N+ET\3116)\245\24\266m\313"
+ #"`TGq\2\256\324\326\372\342\213/&s\340\0\255\37\25\354\3616D\350\35"
+ #"jjld\316\2349\372`\220\362\333"
+ #"\23\22\22\270\350\242\213\270\373\356\273\231"
+ #">}\272w\236Eq\326Y\336@\332\261f[qeG\216\25\b\16TV\362"
+ #"\352\246M\254_\277\236\306\306F\355B*=h\3336\5sf\263`\201\367\236"
+ #"\266\240#\241\5\303\207s\206a\360\371\347\237s\310\177\251rVV\26III"
+ #"\0322\5\221A\334\357\375\235\215\213\36"
+ #"\253\t\252\26\213F\t%x\320\245\343\263q\245\305@cc#K\226,a\343"
+ #"\306\215zs\224\5V\205TS\246La\322\244I\\y\345\225\247\35\277P\213"
+ #":[S\343\27\25\25\361\336;\357RTTD\345\276}\270\20\27\34Qm\314"
+ #"\2301\374\344'?\341\322\234Qq\367"
+ #"\203\214\23\334\270\340w\35sP\301\317"
+ #"\216\277\371\233\274c\27\274\227\317-^\274\230\206\206\6=hp\2J\nrs"
+ #"s52\30:t\250&\346\320\241C"
+ #"\331\273w\257\366m\253\252\252\250\256\256"
+ #"\246\242\242B\353bET]\346L{bn\346\314\231,Z\264H\247\217\377\326"
+ #"\355\274\275>[\213\242\323\36\200\255;y\222U\253V\261r\345J}Z@\305"
+ #"\36\25\347\30\206\301\251S\247\350\324\251"
+ #"S\34\376S\0^\241\200 NT\200\36\320!5\360\210\177\363\31573u\352"
+ #"T\"\311\311\330\261\30V\370\357\363z\330\363"
+ #"\306\221\247\211e\207s\331o\274\376:[\266l"
+) 140
+(24
+ #"\341\335\302\3028\227L=\257\364\241\202"
+ #"6\352\240h8\34\326\360C!\t\305"
+ #"\245\311\311\311\214\31;\226)S\246\220"
+ #"\237\237O\257^\275\264\2528M\5\375\215\333y!\244\202\nq\327\bmPl"
+ #"\377\24\201\302\214\273\212\213)))\241"
+ #"\254\254\214\326\326V\336\177\377}\200\270"
+ #"\310\266\"\262\362tT\335\345\270q\343"
+ #"\310\312\312\";;\233\36\275z\5'\342E\261\211?\346\366\367j"
+ #"\377\a\235Q\352Q\216T\17J\0\0\0\0IEND\256B`\202"
+) 0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 24 3 2 #" ("
+0 0 14 3 14 #"add-3-to-state"
+0 0 24 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 3 3 #" ("
+0 0 14 3 1 #"+"
+0 0 24 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 24 3 1 #" "
+0 0 21 3 1 #"3"
+0 0 24 3 2 #"))"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 24 3 2 #" ("
+0 0 14 3 30 #"draw-a-ufo-onto-an-empty-scene"
+0 0 24 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 3 3 #" ("
+0 0 14 3 11 #"place-image"
+0 0 24 3 1 #" "
+0 0 14 3 12 #"IMAGE-of-UFO"
+0 0 24 3 2 #" ("
+0 0 14 3 1 #"/"
+0 0 24 3 1 #" "
+0 0 14 3 5 #"WIDTH"
+0 0 24 3 1 #" "
+0 0 21 3 1 #"2"
+0 0 24 3 2 #") "
+0 0 14 3 13 #"current-state"
+0 0 24 29 1 #"\n"
+0 0 24 3 16 #" ("
+0 0 14 3 11 #"empty-scene"
+0 0 24 3 1 #" "
+0 0 14 3 5 #"WIDTH"
+0 0 24 3 1 #" "
+0 0 14 3 6 #"HEIGHT"
+0 0 24 3 3 #")))"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 24 3 2 #" ("
+0 0 14 3 18 #"ufo-lands-on-earth"
+0 0 24 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 3 3 #" ("
+0 0 14 3 1 #">"
+0 0 24 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 24 29 1 #"\n"
+0 0 24 3 6 #" ("
+0 0 14 3 1 #"-"
+0 0 24 3 1 #" "
+0 0 14 3 6 #"HEIGHT"
+0 0 24 29 1 #"\n"
+0 0 24 3 9 #" ("
+0 0 14 3 1 #"/"
+0 0 24 3 2 #" ("
+0 0 14 3 12 #"image-height"
+0 0 24 3 1 #" "
+0 0 14 3 12 #"IMAGE-of-UFO"
+0 0 24 3 2 #") "
+0 0 21 3 1 #"2"
+0 0 24 3 4 #"))))"
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 24 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 24 3 2 #" ("
+0 0 14 3 4 #"main"
+0 0 24 3 1 #")"
+0 0 24 29 1 #"\n"
+0 0 24 3 3 #" ("
+0 0 15 3 8 #"big-bang"
+0 0 24 3 1 #" "
+0 0 21 3 1 #"0"
+0 0 24 3 32 #" "
+0 0 17 3 17 #";; initial state "
+0 0 24 29 1 #"\n"
+0 0 24 3 5 #" ("
+0 0 14 3 7 #"on-tick"
+0 0 24 3 1 #" "
+0 0 14 3 14 #"add-3-to-state"
+0 0 24 3 18 #") "
+0 0 17 3 32 #";; when the clock ticks, add ..."
+0 0 24 29 1 #"\n"
+0 0 24 3 5 #" ("
+0 0 14 3 7 #"to-draw"
+0 0 24 3 1 #" "
+0 0 14 3 30 #"draw-a-ufo-onto-an-empty-scene"
+0 0 24 3 2 #") "
+0 0 17 3 36 #";; when the state changes, draw ... "
+0 0 24 29 1 #"\n"
+0 0 24 3 5 #" ("
+0 0 14 3 9 #"stop-when"
+0 0 24 3 1 #" "
+0 0 14 3 18 #"ufo-lands-on-earth"
+0 0 24 3 12 #"))) "
+0 0 17 3 38 #";; when the UFO lands on Earth, stop. "
+0 0 24 29 1 #"\n"
+0 0 24 29 1 #"\n"
+0 0 17 3 43 #";; to run the program, click run and enter "
+0 0 24 29 1 #"\n"
+0 0 17 3 14 #";; > (main) "
+0 0 24 29 1 #"\n"
+0 0 17 3 18 #";; at the prompt. "
+0 0
A EjemplosRacket/Juegos/GUIAdivinaElNumero/source.rkt => EjemplosRacket/Juegos/GUIAdivinaElNumero/source.rkt +257 -0
@@ 0,0 1,257 @@
+#lang racket
+
+#|
+ Juego de adivina el número, jugado en un REPL de Racket
+ ---------------------------------------------------
+
+ Eliges un número. El programa adivina el número
+ haciendo preguntas. Las repuestas son "muy pequeño"
+ "muy grande" y "lo adivinaste".
+
+
+ ¿Cómo jugar?
+ ----
+ Compila el programa en Emacs, o desde la zona de definiciones
+ de Dr. Racket Clicka Run. Elige un número entre <n> y <m>.
+ Evalúa en la REPL
+ (start <n> <m>)
+ El programa responderá con un número en una ventana con instrucciones.
+|#
+
+(require 2htdp/image 2htdp/universe)
+
+;
+;
+;
+; ;
+;
+; ; ;; ;; ;;;; ;;; ; ;;
+; ;; ;; ; ; ; ;; ;
+; ; ; ; ;;;; ; ; ;
+; ; ; ; ; ; ; ; ;
+; ; ; ; ; ;; ; ; ;
+; ; ; ; ;; ; ; ; ;
+;
+;
+
+;; Número Número -> Rango de intentos
+;; Inicia un nuevo juego en [n,m]
+;; > (start 0 100) ; Presiona arriba, arriba, abajo, q.
+;; (interval 76 87)
+(define (start lower upper)
+ (big-bang (interval lower upper)
+ (on-key deal-with-guess)
+ (to-draw render)
+ (stop-when single? render)))
+
+;
+;
+;
+;
+; ; ;
+; ;;;; ;;;;; ;;;; ;;;;; ;;;
+; ; ; ; ; ; ;
+; ;; ; ;;;; ; ;;;;;
+; ; ; ; ; ; ;
+; ; ; ; ;; ; ;
+; ;;;; ;;; ;; ; ;;; ;;;;
+;
+;
+
+(struct interval (small big) #:transparent)
+;; Un Rango de intentos es un (interval Number Number)
+;; Siempre verdadero: (interval l u) significa (<= l u).
+
+;
+;
+;
+;
+; ; ;
+; ;;;; ;;; ; ;; ;;;; ;;;;; ;;;; ; ;; ;;;;; ;;;;
+; ; ; ; ;; ; ; ; ; ;; ; ; ;
+; ; ; ; ; ; ;; ; ;;;; ; ; ; ;;
+; ; ; ; ; ; ; ; ; ; ; ; ; ;
+; ; ; ; ; ; ; ; ; ;; ; ; ; ;
+; ;;;; ;;; ; ; ;;;; ;;; ;; ; ; ; ;;; ;;;;
+;
+;
+
+(define TEXT-SIZE 20)
+(define HELP-TEXT
+ (text "↑ para números mayores, ↓ para menores"
+ TEXT-SIZE
+ "blue"))
+(define HELP-TEXT2
+ (text "Presiona = cuando tu número ha sido adivinado; q para salir."
+ TEXT-SIZE
+ "blue"))
+(define WIDTH (+ (image-width HELP-TEXT2) 20))
+(define HEIGHT 300)
+(define COLOR "red")
+(define SIZE 72)
+(define TEXT-X 3)
+(define TEXT-UPPER-Y 10)
+(define TEXT-LOWER-Y 270)
+(define MT-SC
+ (place-image/align
+ HELP-TEXT TEXT-X TEXT-UPPER-Y
+ "left" "top"
+ (place-image/align
+ HELP-TEXT2
+ TEXT-X TEXT-LOWER-Y "left" "bottom"
+ (empty-scene WIDTH HEIGHT))))
+
+;
+;
+; ; ; ;;;
+; ; ; ;
+; ; ; ;
+; ; ;; ;;;; ; ;; ;; ; ; ;;; ; ;;; ;;;;
+; ;; ; ; ;; ; ; ;; ; ; ; ;; ; ;
+; ; ; ;;;; ; ; ; ; ; ;;;;; ; ;;
+; ; ; ; ; ; ; ; ; ; ; ; ;
+; ; ; ; ;; ; ; ; ;; ; ; ; ;
+; ; ; ;; ; ; ; ;; ; ; ;;;; ; ;;;;
+;
+;
+
+;; GuessRange -> Boolean
+;; Does the interval represent a single number?
+;; > (single? (interval 1 1))
+;; #t
+(define (single? w)
+ (= (interval-small w) (interval-big w)))
+
+;; GuessRange -> Number
+;; Calculates a guess based on the given interval
+;; > (guess (interval 0 100))
+;; 50
+(define (guess w)
+ (quotient (+ (interval-small w) (interval-big w)) 2))
+
+;; GuessRange -> GuessRange
+;; Recreates a GuessRange that lowers the upper bound
+;; > (smaller (interval 0 100))
+;; (interval 0 50)
+(define (smaller w)
+ (interval (interval-small w)
+ (max (interval-small w)
+ (sub1 (guess w)))))
+
+;; GuessRange -> GuessRange
+;; Recreates a interval that raises the lower bound
+;; > (bigger (0 100)
+;; (interval 51 100)
+(define (bigger w)
+ (interval (min (interval-big w)
+ (add1 (guess w)))
+ (interval-big w)))
+
+;; GuessRange Key -> GuessRange
+;; Handles key input
+;; > (key-handler (interval 0 100) "up")
+;; (interval 51 100)
+;; > (key-handler (interval 0 100) "q")
+;; (stop-with (interval 0 100))
+(define (deal-with-guess w key)
+ (cond [(key=? key "up") (bigger w)]
+ [(key=? key "down") (smaller w)]
+ [(key=? key "q") (stop-with w)]
+ [(key=? key "=") (stop-with w)]
+ [else w]))
+
+;
+;
+; ;
+; ; ;
+; ;
+; ; ;;; ;;; ; ;; ;; ; ;;; ; ;;; ;;; ; ;; ;; ;
+; ;; ; ; ; ;; ; ; ;; ; ; ;; ; ; ;; ; ; ;;
+; ; ;;;;; ; ; ; ; ;;;;; ; ; ; ; ; ;
+; ; ; ; ; ; ; ; ; ; ; ; ; ;
+; ; ; ; ; ; ;; ; ; ; ; ; ; ;;
+; ; ;;;; ; ; ;; ; ;;;; ; ; ; ; ;; ;
+; ;
+; ;;;;
+
+;; GuessRange -> Scene
+;; Visualize given interval as a scene
+;; > (render (interval 0 100))
+;; (overlay (text "50" 72 "red") MT-SC)
+(define (render w)
+ (overlay (text (number->string (guess w)) SIZE COLOR) MT-SC))
+
+;
+;
+;
+;
+; ; ;
+; ;;;;; ;;; ;;;; ;;;;; ;;;;
+; ; ; ; ; ; ;
+; ; ;;;;; ;; ; ;;
+; ; ; ; ; ;
+; ; ; ; ; ;
+; ;;; ;;;; ;;;; ;;; ;;;;
+;
+;
+
+(module+ test
+
+ (require rackunit rackunit/text-ui)
+
+ ;; Probando las funciones 'model' para intentos básicos
+
+ (check-true (single? (interval 50 50)))
+ (check-false (single? (interval 50 51)))
+
+ (check-equal? (guess (interval 0 100)) 50)
+ (check-equal? (guess (interval 50 100)) 75)
+ (check-equal? (guess (interval 0 50)) 25)
+
+ (check-equal? (smaller (interval 0 100)) (interval 0 49))
+ (check-equal? (smaller (interval 0 000)) (interval 0 0))
+ (check-equal? (smaller (interval 0 50)) (interval 0 24))
+ (check-equal? (smaller (interval 50 100)) (interval 50 74))
+ (check-equal? (smaller (bigger (bigger (interval 0 100))))
+ (interval 76 87))
+
+ (check-equal? (bigger (interval 0 100)) (interval 51 100))
+ (check-equal? (bigger (interval 0 000)) (interval 0 0))
+ (check-equal? (bigger (interval 0 100)) (interval 51 100))
+ (check-equal? (bigger (interval 51 100)) (interval 76 100))
+ (check-equal? (bigger (interval 0 50)) (interval 26 50))
+
+ (check-equal? (deal-with-guess (interval 0 100) "up") (interval 51 100))
+ (check-equal? (deal-with-guess (interval 0 100) "down") (interval 0 49))
+ (check-equal? (deal-with-guess (interval 0 100) "=")
+ (stop-with (interval 0 100)))
+ (check-equal? (deal-with-guess (interval 0 100) "q")
+ (stop-with (interval 0 100)))
+ (check-equal? (deal-with-guess (interval 0 100) "up")
+ (interval 51 100))
+ (check-equal? (deal-with-guess (interval 50 100) "up")
+ (interval 76 100))
+ (check-equal? (deal-with-guess (interval 0 100) "down")
+ (interval 0 49))
+ (check-equal? (deal-with-guess (interval 0 50) "down")
+ (interval 0 24))
+ (check-equal? (deal-with-guess (interval 50 100) "e")
+ (interval 50 100))
+ (check-equal? (deal-with-guess (interval 0 100) "f")
+ (interval 0 100))
+ (check-equal? (deal-with-guess (deal-with-guess (interval 1 10) "up")
+ "down")
+ (interval 6 7))
+
+ ;; Probando las funciones de visualización
+
+ (check-equal? (render (interval 0 100))
+ (overlay (text "50" 72 "red") MT-SC))
+ (check-equal? (render (interval 0 100))
+ (overlay (text "50" SIZE COLOR) MT-SC))
+ (check-equal? (render (interval 0 50))
+ (overlay (text "25" SIZE COLOR) MT-SC))
+ (check-equal? (render (interval 50 100))
+ (overlay (text "75" SIZE COLOR) MT-SC))
+
+ "all tests run")
A EjemplosRacket/Juegos/GUIAdivinaElNumero/ufo-source.rkt => EjemplosRacket/Juegos/GUIAdivinaElNumero/ufo-source.rkt +563 -0
@@ 0,0 1,563 @@
+#reader(lib"read.ss""wxme")WXME0108 ##
+#|
+ This file uses the GRacket editor format.
+ Open this file in DrRacket version 5.3.4.12 or later to read it.
+ Most likely, it was created by saving a program in DrRacket,
+ and it probably contains a program with non-text elements
+ (such as images or comment boxes).
+ http://racket-lang.org/
+|#
+ 30 7 #"wxtext\0"
+3 1 6 #"wxtab\0"
+1 1 8 #"wximage\0"
+2 0 8 #"wxmedia\0"
+4 1 34 #"(lib \"syntax-browser.ss\" \"mrlib\")\0"
+1 0 16 #"drscheme:number\0"
+3 0 44 #"(lib \"number-snip.ss\" \"drscheme\" \"private\")\0"
+1 0 36 #"(lib \"comment-snip.ss\" \"framework\")\0"
+1 0 93
+(
+ #"((lib \"collapsed-snipclass.ss\" \"framework\") (lib \"collapsed-sni"
+ #"pclass-wxme.ss\" \"framework\"))\0"
+) 0 0 43 #"(lib \"collapsed-snipclass.ss\" \"framework\")\0"
+0 0 19 #"drscheme:sexp-snip\0"
+0 0 36 #"(lib \"cache-image-snip.ss\" \"mrlib\")\0"
+1 0 68
+(
+ #"((lib \"image-core.ss\" \"mrlib\") (lib \"image-core-wxme.rkt\" \"mr"
+ #"lib\"))\0"
+) 1 0 29 #"drscheme:bindings-snipclass%\0"
+1 0 88
+(
+ #"((lib \"pict-snip.rkt\" \"drracket\" \"private\") (lib \"pict-snip.r"
+ #"kt\" \"drracket\" \"private\"))\0"
+) 0 0 33 #"(lib \"bullet-snip.ss\" \"browser\")\0"
+0 0 25 #"(lib \"matrix.ss\" \"htdp\")\0"
+1 0 22 #"drscheme:lambda-snip%\0"
+1 0 26 #"drracket:spacer-snipclass\0"
+0 0 57
+#"(lib \"hrule-snip.rkt\" \"macro-debugger\" \"syntax-browser\")\0"
+1 0 26 #"drscheme:pict-value-snip%\0"
+0 0 45 #"(lib \"image-snipr.ss\" \"slideshow\" \"private\")\0"
+1 0 38 #"(lib \"pict-snipclass.ss\" \"slideshow\")\0"
+2 0 55 #"(lib \"vertical-separator-snip.ss\" \"stepper\" \"private\")\0"
+1 0 18 #"drscheme:xml-snip\0"
+1 0 31 #"(lib \"xml-snipclass.ss\" \"xml\")\0"
+1 0 21 #"drscheme:scheme-snip\0"
+2 0 34 #"(lib \"scheme-snipclass.ss\" \"xml\")\0"
+1 0 10 #"text-box%\0"
+1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0"
+1 0 1 6 #"wxloc\0"
+ 0 0 67 0 1 #"\0"
+0 75 1 #"\0"
+0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9
+#"Standard\0"
+0 75 23 #"Lucida Sans Typewriter\0"
+0 12 90 -1 90 -1 1 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 -1 -1 2 24
+#"framework:default-color\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 15
+#"text:ports out\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 150 0 150 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 255 0 0 0 0 0 -1
+-1 2 15 #"text:ports err\0"
+0 -1 1 #"\0"
+1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 255 0 0 0 0 0 -1
+-1 2 1 #"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 17
+#"text:ports value\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 175 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
+-1 2 27 #"Matching Parenthesis Style\0"
+0 -1 1 #"\0"
+1.0 0 92 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1.0 1.0 1.0 34 139 34 0 0 0 -1
+-1 2 1 #"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 37
+#"framework:syntax-color:scheme:symbol\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 38
+#"framework:syntax-color:scheme:keyword\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 38 38 128 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2
+38 #"framework:syntax-color:scheme:comment\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 194 116 31 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 37
+#"framework:syntax-color:scheme:string\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 39
+#"framework:syntax-color:scheme:constant\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 49
+#"framework:syntax-color:scheme:hash-colon-keyword\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 42
+#"framework:syntax-color:scheme:parenthesis\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36
+#"framework:syntax-color:scheme:error\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 36
+#"framework:syntax-color:scheme:other\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 16
+#"Misspelled Text\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2
+38 #"drracket:check-syntax:lexically-bound\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 81 112 203 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 28
+#"drracket:check-syntax:set!d\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 37
+#"drracket:check-syntax:unused-require\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 36
+#"drracket:check-syntax:free-variable\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 255 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 31
+#"drracket:check-syntax:imported\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 68 0 203 0 0 0 -1 -1 2 47
+#"drracket:check-syntax:my-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 178 34 34 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 50
+#"drracket:check-syntax:their-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 116 0 0 0 0 -1 -1 2 48
+#"drracket:check-syntax:unk-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2
+49 #"drracket:check-syntax:both-obligation-style-pref\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 139 142 28 0 0 0 -1 -1 2
+26 #"plt:htdp:test-coverage-on\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 255 56 81 0 0 0 -1 -1 2 27
+#"plt:htdp:test-coverage-off\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 255 56 81 0 0 0 -1 -1 4 1
+#"\0"
+0 70 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 4 4 #"XML\0"
+0 70 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 2 1 #"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 34 139 34 0 0 0 -1 -1 2 37
+#"plt:module-language:test-coverage-on\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 34 139 34 0 0 0 -1 -1 2 1
+#"\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 2 38
+#"plt:module-language:test-coverage-off\0"
+0 -1 1 #"\0"
+1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 176 48 96 0 0 0 -1 -1 0 1
+#"\0"
+0 75 23 #"Lucida Sans Typewriter\0"
+0.0 12 90 -1 90 -1 1 -1 0 1 0 1 0 0 0.0 0.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0 0.0 0.0 1.0 1.0 1.0 255 0 0 0 0
+0 -1 -1 2 1 #"\0"
+0 70 1 #"\0"
+1.0 0 -1 -1 93 -1 -1 -1 0 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 148 0 211 0
+0 0 -1 -1 2 1 #"\0"
+0 70 1 #"\0"
+1.0 0 -1 -1 -1 -1 -1 -1 1 0 0 0 0 0 0.0 0.0 0.0 1.0 1.0 1.0 0 0 255 0 0
+0 -1 -1 0 1 #"\0"
+0 -1 1 #"\0"
+0.0 12 -1 -1 -1 -1 -1 -1 0 0 1 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 2 1 #"\0"
+0 -1 1 #"\0"
+0.0 12 -1 -1 -1 -1 -1 -1 0 0 1 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0
+-1 -1 0 147 0 27 3 12 #"#lang racket"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 14 3 7 #"require"
+0 0 23 3 1 #" "
+0 0 14 3 14 #"2htdp/universe"
+0 0 23 3 1 #" "
+0 0 14 3 11 #"2htdp/image"
+0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 23 3 1 #" "
+0 0 14 3 5 #"WIDTH"
+0 0 23 3 1 #" "
+0 0 20 3 3 #"200"
+0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 23 3 1 #" "
+0 0 14 3 6 #"HEIGHT"
+0 0 23 3 1 #" "
+0 0 20 3 3 #"300"
+0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 17 3 86
+(
+ #";; depending on your settings, drracket may claim that the image cau"
+ #"ses a syntax error"
+) 0 0 23 29 1 #"\n"
+0 0 17 3 50 #";; please ignore this warning and click RUN anyway"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 23 3 1 #" "
+0 0 14 3 12 #"IMAGE-of-UFO"
+0 0 23 3 1 #" "
+0 2 23 4 1 #"\0"
+2 -1.0 -1.0 0.0 0.0 0 6 500
+(
+ #"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0Q\0\0\0F\b"
+ #"\6\0\0\0\264\\x\25\0\0\nvIDATx\234\355\\\353q\333\274\22"
+ #"=\360\334\377\202R@L7\20Q\5d\fU *\r\210j \246\322\0\351"
+ #"\n(7`\321\25P\223\2L\272\201\220J\1\241\234\2>\322.@{\177\330"
+ #"@\370\322\233\262\235\214\317\f\306\326\203"
+ #"\300\362`\261\330\a(FD\204W\4"
+ #"\21\2011\246\376\376\215`\257M\342\277"
+ #"\200\223\327\34\374_\231\277W!Q\222"
+ #"\367\267.\3372^\205\304\177\205<\211"
+ #"\377\275\304 D\204\307\307GDQT\371L\327up\316_B\214\343\201\216\210"
+ #"(\212\3104M\3224\215\0\20c\214\0T\232\246id\232&\371\276\177Lq"
+ #"\216\206\243\220\30\4\1\t!j\t\253kyr[\255\26\331\266Mi\232\36C"
+ #"\264\243\240q\27g<\36c2\231\0"
+ #"\200\362\377\6\203\1:\235\16\204\20R\373\1\0wwwX,\26\b\303\20\213"
+ #"\305\242\320\17\347\34\266m\303\262\254&"
+ #"\305;\16\232\232\2154M\3110\214\212v\t!\266\272^.}\2244\3230\f"
+ #"\312\262\254\366\232\345r\331\224\370\a\241"
+ #"1\22%\1\0\250\333\355\252\377\267%Qb\261X\320p8,\220\251\353\372\233"
+ #"^\336\215\220h\333\266\272i\3030\210"
+ #"s\256Ht\34g\355\265\253\264)\212\"\3224\355\257 \362`\22\223$),"
+ #"=\271\241\350\272N\0\310u]\"\372"
+ #"C\326.K\260l\"\272\335\356\241\342\36\5\a\223(\2271\347\234|\337WK"
+ #"\330q\34\2@A\20\250\357\356k\303"
+ #"\206\303\241\322H\333\266\337\214-\224\330"
+ #"H\342:\201\363Z\350y\36\365\373}b\214Q\24E\324\353\365\b\0%I\322"
+ #"\210\240y\227i\261X4\322gS\330J\23W"
+ #"\219\231L\224\26\246iZ\330H\344\r7\2054"
+) 500
+(
+ #"M\225\323n\232fc\3756\201\203\356Rj\207i\232\24\4\201\322\3104M\325"
+ #"\362k\22r\214\267\246\215\a% \3020\4\0\364\373}DQ\4\306\30NO"
+ #"O\245\377\t]\327\17\351\276\2!\4"
+ #"\204\20`\214\301\367\375F\373>\4{"
+ #"\223\230\2170t]\307\343\343#\210\b"
+ #"\275^\17\343\361\30\0\320n\267\17\26"
+ #"\260\f\333\266AD\270\271\271i\274\357"
+ #"\275\261\257\n\347\227\26\21\221\3438\265"
+ #"\t\206c@\332\306\267\202\275Sa2'\250i\32\0\340\342\342\2\235N\a?"
+ #"\177\376\4\21\325\306\303M\3010\fL"
+ #"&\23\204a\250\342q\340O\275\346\245"
+ #"\2617\211\364\234D\2206\260\325j\301"
+ #"0\f\30\206\1\340i\331\35\v\253l\355k%{\17\316lK\301\217y\3T"
+ #"J4\311\211{+vq/\22\211H-\325\207\207\207&\345\251Ey\202\244\t"
+ #"\361<\17wwwG\37\177#v1\240y\247;\37\323\266\333m2M\223f"
+ #"\263Y\223\366\272\2028\216\3114\315B"
+ #"\202C:\372\257\211\275\2668\231\265\221"
+ #"\255\274+\313\3309\b\202\203n\360\376"
+ #"\376\236<\317+\224\30\352\332kgx"
+ #"v\316l{\236\207\321h\264\263\306\313]T\b\261r\27e\214!\212\"dY"
+ #"\246\34\371:0\306\320j\265\360\360\360"
+ #"\240\372\32\16\207\230N\247;\313\325\b"
+ #"va<\212\242\302R\3224\215\204\20"
+ #"*\355\205\32\255\224\257W\25\251\266i\362ZM\323h0\30P\267\333-\310!"
+ #"\333k\305\324[\2738Y\226a4\32"
+ #"!\3132\365\236\334\\\204\20\30\16\207\350\365z\350t:\210\343X}/o\370"
+ #"\3030Tu\227,\313\20\307qe\34\316\271ra4M\203\246i\350t:\340"
+ #"\234\343\356\356\16\223\311\244 \3\0X\226\205,\313\340y\36\0`:\235"
+ #"\276\254\317\270-\333\371\364\177\273\335"
+ #"^\2531B\b\262,\213\\\327=\310"
+) 500
+(
+ #".\6A@\216\343\0244=\337\316\317"
+ #"\317U\276\362\277\377\376S\337{i\215\334\312&\316f3\f\6\3\0O\2322"
+ #"\36\217\361\361\343G0\306\20\3071\302"
+ #"0\254\325\2522d\241\2361\206\363\363"
+ #"\363\312\347R\203\27\213\205\322r\251\271"
+ #"r\354^\257\207\317\237?\343\313\227/"
+ #"\205d\207\224\245\327\353!\3132X\226"
+ #"\5\327u7\312\324\b6\261\234\246i\305\245\360}\237|\337'M\323T\r%"
+ #"MS\362}\237\34\307\241\363\363\363\225"
+ #"\332Zn\333\330J\327u)\212\"%\323\272D\361t:U\327M\247\323\303T"
+ #"lKl$\261\337\357\27n(\fCJ\222\204\242(R\2\327-\237\321h\244"
+ #"\352.\216\343\220a\30+\227e\236L"
+ #"!\4\231\246I\236\347\25\222\30\273\324"
+ #"h,\313R\375\275\4\221\25\22\363B\6AP\2709M\323\210\210T\25N\326"
+ #"T\312\n}}}M\214\261\332J\37\347\234\6\203\301v\302m\231\t\252#6"
+ #"?a777[\215\267/\na\37\225v\264\361x\254\222\253\375~\37\246i"
+ #"\2x\262MD\244\302/\371>=\333\256\337\277\177\203\2100\34\16\341y\36."
+ #"//\225\337\327n\267\221\246ia\314"
+ #"U(\357\256i\232\242\327\353\2011\6\306X\301n\226\341\373\276:(uqq"
+ #"\241l\366\272\361\366\306*v\363\266%\212\"r]\227\272\335.EQDY\226"
+ #"Q\232\246\224$\tq\316+'\24\344\265D\244\nV\262t\212\347\bc\e\240"
+ #"\244\211\262\202(\333\252\232\266\324\314\374"
+ #"Ji\267\333\312Kh\272Z\250$,w,\227\254\0244\212\"%\220\264s\246"
+ #"i\256\254\346\351\272NA\20\220\353\272$\204\240$IT\"\267|*b\325M"
+ #"\225\3534\345CR\206al\274A\313\262\n\341\3411P\253\211r"
+ #"\6\363\301\375r\271\244\351tJB\b\352\365z\25\203]&\"\216c"
+) 500
+(
+ #"2\f\203\202 \240 \bh6\233Q\253\325\"\306\30Y\226\265\235p%M\314"
+ #"\23X7\31u\310W\t\1l=\366.\250%q0\30\324.\227]\227A\222"
+ #"$J{\244V\265\333\355\255k\321e\22\313}I\23\261\t\371R\6P<P"
+ #"\320\4\330r\271\244\274a\316\262\f\37"
+ #">|@\253\325B\222$\215\234b\215\343\30\337\277\177\307r\271\304h4RN"
+ #"\362&H\271(\267\31\204a\2100\fqrr\202\257_\277n-\337\267o\337"
+ #"\224\363}vv\206_\277~\355x\27kPfUn\nuj\177\250A\336\344"
+ #"\353\225\337\307\226.\316\246~\210\236\226"
+ #"u>\0h\322\177\254H(c\344|\204p(\366%\177_\22W\215-ww"
+ #"\306\230\362y\233@EB]\327\211s\336\330\0\207\240\t\22\363(\207\260Me"
+ #"\342+5\226\371|\16\3169<\317\253"
+ #"\244\234\3362\350\331nR\2153\375\360"
+ #"\360\0\317\3630\30\f\n\367\264.\361\273\v*Y\34\31\r\310\267;\235\16z"
+ #"\275\36t]\307\247O\237\320\355v\e"
+ #"\31x\e\234\234\234\200\236V\313\316\327"
+ #"\206a\210\273\273;\4A\260\262\230%\204@\20\4\207\212Y_w\316\v=\237"
+ #"\3171\237\317\325k\231\306\322u\35\247"
+ #"\247\247\350v\2738==U!`\271\237}\23\243Y\226mE\236L\233\311C"
+ #"\364q\34o\225\226k\22\265$Z\226"
+ #"\5\3169\34\307Q\357I\355\244\347\323"
+ #"\rr)\224\265\266\335n\253\274\241\314"
+ #"R\23Q!c\275\16\222\370\374\203CR\253\200\3659\307\362_M\323\260X,"
+ #"\320j\265\20\3071F\243QcK\270,t\1x\16\217\362!\232\357\373j\327"
+ #"\326u\235|\337/\224L\367mB\210\225m]\332,\337\362N\274m\333*:"
+ #"\271\275\275\255\204\231\371\335\31\rF/\265$\2"
+ #"P'\370\245\0\223\311\204\30c\364\343\307\17\""
+) 500
+(
+ #"\372S6\235\315f\344\272.u:\35\25\345\f\6\203\332BR\23\244\313~M"
+ #"\323,\220\26\4\1-\227K\25\325\4A@\213\305B]\233$I\345\311\256\246"
+ #"\334\270\n\211\345 \377\354\354\214\202 "
+ #"P\232'C6\333\266\2111\246\234V"
+ #"y\203\371~\344\347I\222\220\353\272J"
+ #"\233e\342u\25Y\234\363\312\1\322\262"
+ #"|R\16\371\272\374\271\357\373\24\4\301"
+ #"\312\311<\252\237\350\272na\251\224\323"
+ #"\367ggg4\34\16\25\t\266m\257\275\231|\234\\>\f/\307\220\310gm"
+ #"\344R,\307\357\345q\344\344\372\276_ylc\335\362?j\304\222?\314\276m"
+ #"\343\234\253\31\17\202\200\242(RI\214<\362$.\227Ku\275\22&\367Z\206"
+ #"\237\345t\227\324\360\262\335\344\234\257$"
+ #"\217s^\260\341M\247\304@T\r\313\362K\3154M\262,\253\326\340\357R\220"
+ #"\3274\255pp=\257\3612/)\373t]\227\306\343q\201\204:mZ7\276"
+ #"\264\231\262d\233O27\235\305\251\255"
+ #"\261$I\242\226\262\256\353*<\212\242\210\f\303(<Sr\214\rd\23a\371"
+ #"\t\311\267\351t\252\226\363\365\365\265\272"
+ #"\247\274m\224\346\247I\324\326\235\211\b"
+ #"\227\227\227\270\274\274,\177\4\340\251\306"
+ #"r{{\213n\267\v\307qpyy\251\316\307\270\256\vM\323\n\376#\200\202"
+ #"_)\307\220\276_\371\273\371q:\235"
+ #"\16\200\247\323\20\247\247\2478;;\303"
+ #"\325\325\25\256\256\256\n\327L\247S\f"
+ #"\207C%7\347\34\246i\26j\342\246"
+ #"i\342\372\372\272\371\223\21\353\30\256\363"
+ #"\59\347\25\327\240l\233\216U\246\234N\247\25\315\3274M\271]DOI\6"
+ #"\351n\345\233,\353\36\343i\254Z\22"
+ #"\345@i\232\222m\333$\204\240\363\363s2M\263\366HH\232\246\244\353"
+ #"za\311\t!\32\261=i\232\222\353\272\265\313\327\262\254\212<\313\345R"
+) 235
+(
+ #"=\23(\204 \3030\216~nr\347<\323\252\231\224D\242d\277t]W\276"
+ #"\342\266\220\247)L\323\254\335<\204\20"
+ #"\215\346;\17\305\332\2638\264G\2\301q\34\\]]\325\246\321t]W\211\213"
+ #"|,=\237\317\221\246)\356\357\357\21\3071\346\363y\255\2154M\23\226e)"
+ #";\371fp\214\231\221f\240\34f\355sF\3210\f\362<\217\262,\333\353q"
+ #"\337\227\300V\247\302\350\200\224V\34\307"
+ #"\230\315f\230\317\347*U%Q\336\225"
+ #"\205\20\352<\242\256\353\205gTv\205"
+ #"\354\367%\316(\36\365\267\3026\221\277"
+ #"\353\344\344\211i\272\357C\360\376\203k"
+ #"\r\340\305\177\346\352XsV\356w\325"
+ #"8\307\30\377]\23\e\300\253\376\364\337"
+ #"\277\202w\22\e\300;\211\r\340\235\304\6\360Nb\3\370?"
+ #"R\3460\324\254\223\240\300\0\0\0\0IEND\256B`\202"
+) 0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 23 3 2 #" ("
+0 0 14 3 14 #"add-3-to-state"
+0 0 23 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 3 3 #" ("
+0 0 14 3 1 #"+"
+0 0 23 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 23 3 1 #" "
+0 0 20 3 1 #"3"
+0 0 23 3 2 #"))"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 23 3 2 #" ("
+0 0 14 3 30 #"draw-a-ufo-onto-an-empty-scene"
+0 0 23 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 3 3 #" ("
+0 0 14 3 11 #"place-image"
+0 0 23 3 1 #" "
+0 0 14 3 12 #"IMAGE-of-UFO"
+0 0 23 3 2 #" ("
+0 0 14 3 1 #"/"
+0 0 23 3 1 #" "
+0 0 14 3 5 #"WIDTH"
+0 0 23 3 1 #" "
+0 0 20 3 1 #"2"
+0 0 23 3 2 #") "
+0 0 14 3 13 #"current-state"
+0 0 23 29 1 #"\n"
+0 0 23 3 16 #" ("
+0 0 14 3 11 #"empty-scene"
+0 0 23 3 1 #" "
+0 0 14 3 5 #"WIDTH"
+0 0 23 3 1 #" "
+0 0 14 3 6 #"HEIGHT"
+0 0 23 3 3 #")))"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 23 3 2 #" ("
+0 0 14 3 12 #"state-is-300"
+0 0 23 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 3 3 #" ("
+0 0 14 3 2 #">="
+0 0 23 3 1 #" "
+0 0 14 3 13 #"current-state"
+0 0 23 3 1 #" "
+0 0 20 3 3 #"300"
+0 0 23 3 2 #"))"
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 23 3 1 #"("
+0 0 15 3 6 #"define"
+0 0 23 3 2 #" ("
+0 0 14 3 4 #"main"
+0 0 23 3 1 #")"
+0 0 23 29 1 #"\n"
+0 0 23 3 3 #" ("
+0 0 14 3 8 #"big-bang"
+0 0 23 3 1 #" "
+0 0 20 3 1 #"0"
+0 0 23 3 40 #" "
+0 0 17 3 17 #";; initial state "
+0 0 23 29 1 #"\n"
+0 0 23 3 13 #" ("
+0 0 14 3 7 #"on-tick"
+0 0 23 3 1 #" "
+0 0 14 3 14 #"add-3-to-state"
+0 0 23 3 18 #") "
+0 0 17 3 32 #";; when the clock ticks, add ..."
+0 0 23 29 1 #"\n"
+0 0 23 3 13 #" ("
+0 0 14 3 7 #"to-draw"
+0 0 23 3 1 #" "
+0 0 14 3 30 #"draw-a-ufo-onto-an-empty-scene"
+0 0 23 3 2 #") "
+0 0 17 3 36 #";; when the state changes, draw ... "
+0 0 23 29 1 #"\n"
+0 0 23 3 13 #" ("
+0 0 14 3 9 #"stop-when"
+0 0 23 3 1 #" "
+0 0 14 3 12 #"state-is-300"
+0 0 23 3 18 #"))) "
+0 0 17 3 45 #";; when the UFO's y coordinate is 300, stop. "
+0 0 23 29 1 #"\n"
+0 0 23 29 1 #"\n"
+0 0 17 3 43 #";; to run the program, click run and enter "
+0 0 23 29 1 #"\n"
+0 0 17 3 14 #";; > (main) "
+0 0 23 29 1 #"\n"
+0 0 17 3 18 #";; at the prompt. "
+0 0
A EjemplosRacket/Juegos/TorresDeHanoi/hanoi.rkt => EjemplosRacket/Juegos/TorresDeHanoi/hanoi.rkt +106 -0
@@ 0,0 1,106 @@
+#lang racket
+
+(require racket/stream
+ racket/list
+ racket/match
+ 2htdp/image
+ 2htdp/universe)
+
+(struct move (from to))
+
+(define (towers n from to extra)
+ (if (= n 0)
+ empty-stream
+ (stream-append
+ (towers (sub1 n) from extra to)
+ (stream-cons (move from to)
+ (towers (sub1 n) extra to from)))))
+
+(define disc-width 20)
+(define disc-height 20)
+(define (draw-disc d)
+ (rectangle (* d disc-width) disc-height 'solid "black"))
+
+(define (draw-stack s)
+ (apply above
+ empty-image empty-image
+ (map draw-disc s)))
+
+(define (draw-stacks n ss)
+ (apply
+ beside/align
+ 'top
+ (map
+ (λ (s)
+ (define m (- n (length s)))
+ (above (rectangle (* n disc-width)
+ (* m disc-height)
+ 'solid "white")
+ (draw-stack s)))
+ ss)))
+
+ (define (list-move ss from to)
+ (define from-disc (first (list-ref ss from)))
+ (for/list ([s (in-list ss)]
+ [i (in-naturals)])
+ (cond
+ [(= i from)
+ (rest s)]
+ [(= i to)
+ (list* from-disc s)]
+ [else
+ s])))
+
+
+(define-syntax-rule
+ (define-move-disc move-disc/forward
+ fs bs
+ cond:e
+ m from to mfrom mto
+ first:e
+ nfs nbs)
+ (define (move-disc/forward w)
+ (match-define (world ss fs bs) w)
+ (cond
+ [cond:e
+ w]
+ [else
+ (match-define (and m (move from to)) first:e)
+ (world (list-move ss mfrom mto) nfs nbs)])))
+
+(define-move-disc move-disc/forward
+ fs bs
+ (stream-empty? fs)
+ m from to from to
+ (stream-first fs)
+ (stream-rest fs)
+ (cons m bs))
+(define-move-disc move-disc/backward
+ fs bs
+ (empty? bs)
+ m to from from to
+ (first bs)
+ (stream-cons m fs)
+ (rest bs))
+
+(struct world (stacks forward backward))
+
+(define (show n)
+ (define ms (towers n 0 2 1))
+ (define s
+ (list (build-list n add1)
+ empty
+ empty))
+ (define (draw-world w)
+ (draw-stacks n (world-stacks w)))
+ (define (move-disc w k)
+ (cond
+ [(equal? k "left")
+ (move-disc/backward w)]
+ [(equal? k "right")
+ (move-disc/forward w)]
+ [else
+ w]))
+ (big-bang (world s ms empty)
+ (on-key move-disc)
+ (to-draw draw-world)))