comparison clojure/com/aurellem/run/bootstrap_1.clj @ 357:f8b374397426

got elemental stones; floor four complete.
author Robert McIntyre <rlm@mit.edu>
date Mon, 09 Apr 2012 07:20:41 -0500
parents b3ea7e8c10bf
children 016c2bcca08f
comparison
equal deleted inserted replaced
356:b3ea7e8c10bf 357:f8b374397426
453 ([] (go-to-floor-three (floor-two-items))) 453 ([] (go-to-floor-three (floor-two-items)))
454 ([script] 454 ([script]
455 (->> script 455 (->> script
456 (walk [→ → → → ↑ ↑ ↑ 456 (walk [→ → → → ↑ ↑ ↑
457 → → → → → → → ↑])))) 457 → → → → → → → ↑]))))
458 (defn get-TM18 458 (defn-memo get-TM18
459 ([] (get-TM18 (go-to-floor-three))) 459 ([] (get-TM18 (go-to-floor-three)))
460 ([script] 460 ([script]
461 (->> script 461 (->> script
462 (walk [↓ ↓]) 462 (walk [↓ ↓])
463 talk 463 talk
464 (scroll-text 3) 464 (scroll-text 3)
465 end-text))) 465 end-text)))
466 466
467 (defn go-to-floor-four 467 (defn-memo go-to-floor-four
468 []) 468 ([] (go-to-floor-four (get-TM18)))
469 469 ([script]
470 (defn floor-four-items 470 (->> script
471 []) 471 (walk [← ← ← ← ↑ ↑
472 ↓ ← ← ↓ ↓ ↓
473 ← ← ← ← ←])
474 (turn ↓))))
475
476 (defn-memo floor-four-items
477 ([] (floor-four-items (go-to-floor-four)))
478 ([script]
479 (->> script
480 talk
481 select-menu-entry
482 (buy-item 1 23) ;; Fire Stone
483 (buy-item 2 98) ;; Thunder Stone
484 (buy-item 3 29) ;; Water Stone
485 close-menu
486 end-shop-conversation)))
472 487
473 (defn go-to-floor-five 488 (defn go-to-floor-five
474 []) 489 [])
475 490
476 (defn floor-five-items 491 (defn floor-five-items