# HG changeset patch # User Robert McIntyre # Date 1332865858 18000 # Node ID 210b465e4720d6f2cc8fa9720613016d0f6b641d # Parent 3266bd0a6300057cbe2d8034e8a12cfbf6cc56f0 refactored walking code from buy-initial-objects to its own function. diff -r 3266bd0a6300 -r 210b465e4720 clojure/com/aurellem/run/bootstrap_0.clj --- a/clojure/com/aurellem/run/bootstrap_0.clj Tue Mar 27 00:33:07 2012 -0500 +++ b/clojure/com/aurellem/run/bootstrap_0.clj Tue Mar 27 11:30:58 2012 -0500 @@ -18,8 +18,7 @@ scroll-text scroll-text scroll-text - scroll-text - ))) + scroll-text))) (defn-memo name-rival-bootstrap ([] (name-rival-bootstrap (to-rival-name))) @@ -397,7 +396,6 @@ (end-text) (scroll-text 7) (end-text) - (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓])))) (defn-memo return-to-viridian-mart @@ -406,4 +404,40 @@ ([script] (->> script oaks-lab->pallet-town-edge - (pallet-edge->viridian-mart false)))) \ No newline at end of file + (pallet-edge->viridian-mart false)))) + +(defn-memo walk-to-counter + ([] (walk-to-counter + (return-to-viridian-mart))) + ([script] + (->> script + (walk [↑ ↑ ← ←])))) + + +(defn-memo buy-initial-objects + ([] (buy-initial-objects + (walk-to-counter))) + ([script] + (->> script + ;(do-nothing 200) + (play-moves + [[] [:a] []]) + (scroll-text) + (do-nothing 100) + (play-moves [[:a]]) + (do-nothing 100) + (play-moves [[:a]]) + (do-nothing 100) + (play-moves [[:a]]) + (do-nothing 100) + (scroll-text) + (do-nothing 100) + (play-moves [[:a]]) + (do-nothing 100) + (play-moves [[:a]]) + (do-nothing 100)))) + + + + + \ No newline at end of file