comparison clojure/com/aurellem/run/bootstrap_1.clj @ 362:8d8023057b3c

script: made it to celadon poke-center.
author Robert McIntyre <rlm@mit.edu>
date Mon, 09 Apr 2012 09:25:33 -0500
parents 64d09d021025
children 79252378fd22
comparison
equal deleted inserted replaced
361:64d09d021025 362:8d8023057b3c
536 (buy-drink 0) ;; fresh water (for TM13) 536 (buy-drink 0) ;; fresh water (for TM13)
537 ;; buy 16 lemonades 537 ;; buy 16 lemonades
538 ;; LEMONADE is the best item <3 :) 538 ;; LEMONADE is the best item <3 :)
539 (multiple-times 16 (partial buy-drink 2))))) 539 (multiple-times 16 (partial buy-drink 2)))))
540 540
541 (defn get-TM13 541 (defn-memo get-TM13
542 ([] (get-TM13 (roof-drinks))) 542 ([] (get-TM13 (roof-drinks)))
543 ([script] 543 ([script]
544 (->> script 544 (->> script
545 (walk [← ← ← ← ← ← ↓]) 545 (walk [← ← ← ← ← ← ↓])
546 (play-moves [[][:a][:a][]]) 546 (play-moves [[][:a][:a][]])
547 (scroll-text 3) 547 (scroll-text 3)
548 select-menu-entry 548 select-menu-entry
549 select-menu-entry 549 select-menu-entry
550 (scroll-text 6) 550 (scroll-text 6)
551 close-menu))) 551 close-menu)))
552 552
553 (defn to-celadon-poke-center
554 ([] (to-celadon-poke-center (get-TM13)))
555 ([script]
556 (->> script
557 (walk [↑ → → → → → → → → → ↑]) ; leave roof
558 (walk [↓ ← ← ← ← ↓ ↓ ↓ ← ← ← ← ←
559 ↑ ↑ ↑ ← ← ↑]) ; to elevator
560
561 (walk [→ → ↑ ↑]) ; to controls
562 talk
563 select-menu-entry ; to floor 1
564 (walk [↓ ↓ ← ←])
565 (walk [↓ → ↓ ↓ ↓ ↓ ↓ ↓]) ; leave store
566 (walk [↓ → → → → → → → → → → ↑ ↑])
567 (walk (repeat 23 →))
568 (walk [↑ ↑ ↑ ↑]) ; enter poke center
569 (walk [↑ ↑ ↑ → → → → → → → → → →]) ; to computer
570 (turn ↑))))