comparison clojure/com/aurellem/run/save_corruption.clj @ 255:d9e0752da684

unicode walking :)
author Robert McIntyre <rlm@mit.edu>
date Mon, 26 Mar 2012 06:00:30 -0500
parents b7f682bb3090
children 8d1a354f7471
comparison
equal deleted inserted replaced
254:5dafe6188ca5 255:d9e0752da684
8 ([script] 8 ([script]
9 (->> script 9 (->> script
10 (advance [:b] [:b :r]))) 10 (advance [:b] [:b :r])))
11 ([] (start-walking (finish-title)))) 11 ([] (start-walking (finish-title))))
12 12
13 (def walk (partial advance [])) 13
14 (def move
15 (partial advance []))
14 16
15 (defn-memo walk-to-stairs 17 (defn-memo walk-to-stairs
16 ([] (walk-to-stairs (start-walking))) 18 ([] (walk-to-stairs (start-walking)))
17 ([script] 19 ([script]
18 (->> script 20 (->> script
19 (walk [:u]) 21 (move [:u])
20 (walk [:u]) 22 (move [:u])
21 (walk [:u]) 23 (move [:u])
22 (walk [:u]) 24 (move [:u])
23 (walk [:u]) 25 (move [:u])
24 (walk [:r]) 26 (move [:r])
25 (walk [:r]) 27 (move [:r])
26 (walk [:r])))) 28 (move [:r]))))
27 29
28 (defn-memo walk-to-door 30 (defn-memo walk-to-door
29 ([] (walk-to-door (walk-to-stairs))) 31 ([] (walk-to-door (walk-to-stairs)))
30 ([script] 32 ([script]
31 (->> script 33 (->> script
32 (walk [:d]) 34 (move [:d])
33 (walk [:d]) 35 (move [:d])
34 (walk [:d]) 36 (move [:d])
35 (walk [:d]) 37 (move [:d])
36 (walk [:d]) 38 (move [:d])
37 (walk [:d]) 39 (move [:d])
38 (walk [:l]) 40 (move [:l])
39 (walk [:l]) 41 (move [:l])
40 (walk [:l]) 42 (move [:l])
41 (walk [:l])))) 43 (move [:l]))))
42 44
43 (defn-memo activate-menu 45 (defn-memo activate-menu
44 ([] (activate-menu (walk-to-door))) 46 ([] (activate-menu (walk-to-door)))
45 ([script] 47 ([script]
46 (->> script 48 (->> script