Mercurial > vba-clojure
comparison clojure/com/aurellem/run/bootstrap_0.clj @ 257:8d1a354f7471
continued work on unoptimized script
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 26 Mar 2012 07:20:30 -0500 |
parents | d9e0752da684 |
children | 2a46422902be |
comparison
equal
deleted
inserted
replaced
256:c7b002525041 | 257:8d1a354f7471 |
---|---|
68 ([script] | 68 ([script] |
69 (->> script | 69 (->> script |
70 start-walking | 70 start-walking |
71 (walk [→ → → → → | 71 (walk [→ → → → → |
72 ↑ ↑ ↑ ↑ ↑ ↑])))) | 72 ↑ ↑ ↑ ↑ ↑ ↑])))) |
73 | |
74 | 73 |
74 (defn end-text [script] | |
75 (->> script | |
76 (scroll-text) | |
77 (play-moves [[] [:a]]))) | |
78 | |
79 (defn-memo start-pikachu-battle | |
80 ([] (start-pikachu-battle | |
81 (to-pallet-town-edge))) | |
82 ([script] | |
83 (->> script | |
84 (advance [:b] [:b :a] DE) | |
85 (scroll-text) | |
86 (play-moves [[:b]]) | |
87 (scroll-text) | |
88 (end-text) ;; battle begins | |
89 (scroll-text)))) | |
90 | |
91 (defn-memo capture-pikachu | |
92 ([] (capture-pikachu (start-pikachu-battle))) | |
93 ([script] | |
94 (->> script | |
95 (scroll-text 2) | |
96 (end-text)))) | |
97 | |
98 (defn-memo go-to-lab | |
99 ([] (go-to-lab (capture-pikachu))) | |
100 ([script] | |
101 (->> script | |
102 (scroll-text 5) | |
103 (end-text) | |
104 (scroll-text) | |
105 (end-text) | |
106 (scroll-text 8) | |
107 (end-text) | |
108 (scroll-text) | |
109 (end-text)))) | |
110 | |
111 (defn-memo obtain-pikachu | |
112 ([] (obtain-pikachu (go-to-lab))) | |
113 ([script] | |
114 (->> script | |
115 (scroll-text) | |
116 (play-moves | |
117 (concat | |
118 (repeat 51 []) | |
119 [[:a] []])) | |
120 (walk [↓ ↓ → → ↑]) | |
121 (play-moves [[:a]])))) | |
122 | |
123 | |
124 | |
125 |