Mercurial > vba-clojure
comparison clojure/com/aurellem/run/bootstrap_0.clj @ 271:3266bd0a6300
script: went back to viridian store.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 27 Mar 2012 00:33:07 -0500 |
parents | 49096b8b99d5 |
children | 210b465e4720 |
comparison
equal
deleted
inserted
replaced
270:49096b8b99d5 | 271:3266bd0a6300 |
---|---|
228 (pikachu-comes-out))) | 228 (pikachu-comes-out))) |
229 ([script] | 229 ([script] |
230 (->> script | 230 (->> script |
231 (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓])))) | 231 (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓])))) |
232 | 232 |
233 (defn-memo oaks-lab->pallet-town-edge | 233 (defn-memo oaks-lab->pallet-town-edge |
234 ([] (oaks-lab->pallet-town-edge | 234 ([] (oaks-lab->pallet-town-edge |
235 (leave-oaks-lab))) | 235 (leave-oaks-lab))) |
236 ([script] | 236 ([script] |
237 (->> script | 237 (->> script |
238 (walk [← ← ← ← | 238 (walk [← ← ← ← |
239 ↑ ↑ ↑ ↑ | 239 ↑ ↑ ↑ ↑ |
240 ↑ ↑ ↑ ↑ ↑ ↑ | 240 ↑ ↑ ↑ ↑ ↑ ↑ |
241 → ↑])))) | 241 → ↑])))) |
242 | |
243 | 242 |
244 (defn move-thru-grass | 243 (defn move-thru-grass |
245 [direction script] | 244 [direction script] |
246 (loop [blanks 0] | 245 (loop [blanks 0] |
247 (let [new-script | 246 (let [new-script |
264 (reduce (fn [script direction] | 263 (reduce (fn [script direction] |
265 (move-thru-grass direction script)) | 264 (move-thru-grass direction script)) |
266 script directions)) | 265 script directions)) |
267 | 266 |
268 (defn-memo pallet-edge->viridian-mart | 267 (defn-memo pallet-edge->viridian-mart |
269 ([] (pallet-edge->viridian-mart | 268 ([] (pallet-edge->viridian-mart true |
270 (oaks-lab->pallet-town-edge))) | 269 (oaks-lab->pallet-town-edge))) |
271 ([script] | 270 ([dodge-stupid-guy? script] |
272 (->> script | 271 (let [dodge-1 (if dodge-stupid-guy? |
272 [→ →] | |
273 [→]) | |
274 dodge-2 (if dodge-stupid-guy? | |
275 [↑ ↑ ←] | |
276 [↑ ↑ ←])] | |
277 | |
278 (->> script | |
273 ;; leave straight grass | 279 ;; leave straight grass |
274 (walk-thru-grass | 280 (walk-thru-grass |
275 [↑ ↑ ↑ ↑ ↑]) | 281 [↑ ↑ ↑ ↑ ↑]) |
276 | 282 |
277 (walk [↑ ↑ ↑ ↑]) | 283 (walk [↑ ↑ ↑ ↑]) |
286 (walk | 292 (walk |
287 [← ← | 293 [← ← |
288 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ | 294 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ |
289 → → → → ]) | 295 → → → → ]) |
290 | 296 |
291 ;; this part it dependent on that | 297 ;; this part is dependent on that |
292 ;; stupid NPC in the grass patch | 298 ;; stupid NPC in the grass patch |
293 (walk-thru-grass | 299 (walk-thru-grass |
294 [→ → | 300 (concat dodge-1 |
295 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ]) | 301 [↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ])) |
296 | 302 |
297 (walk | 303 (walk |
298 [↑ ↑ | 304 (concat |
299 ← ← ← ← | 305 dodge-2 |
300 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ | 306 [← ← ← |
301 ← ← | 307 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ |
302 ↑ ↑ ↑ ↑ | 308 ← ← |
303 → → → → → → → → → → | 309 ↑ ↑ ↑ ↑ |
304 ↑ ↑ ↑ ↑ ↑ ↑ ↑])))) | 310 → → → → → → → → → → |
311 ↑ ↑ ↑ ↑ ↑ ↑ ↑])))))) | |
305 | 312 |
306 (defn-memo get-oaks-parcel | 313 (defn-memo get-oaks-parcel |
307 ([] (get-oaks-parcel | 314 ([] (get-oaks-parcel |
308 (pallet-edge->viridian-mart))) | 315 (pallet-edge->viridian-mart))) |
309 ([script] | 316 ([script] |
389 (scroll-text 9) | 396 (scroll-text 9) |
390 (end-text) | 397 (end-text) |
391 (scroll-text 7) | 398 (scroll-text 7) |
392 (end-text) | 399 (end-text) |
393 | 400 |
394 (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓]) | 401 (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓])))) |
395 | 402 |
396 ))) | 403 (defn-memo return-to-viridian-mart |
404 ([] (return-to-viridian-mart | |
405 (deliver-oaks-parcel))) | |
406 ([script] | |
407 (->> script | |
408 oaks-lab->pallet-town-edge | |
409 (pallet-edge->viridian-mart false)))) |