comparison clojure/com/aurellem/run/title.clj @ 318:9a4d3f801c89

fixing runs to use new util functions.
author Robert McIntyre <rlm@mit.edu>
date Mon, 02 Apr 2012 23:13:49 -0500
parents 8e63b0bb8ea3
children a452deec2882
comparison
equal deleted inserted replaced
317:3c5bf2221ea0 318:9a4d3f801c89
1 (ns com.aurellem.run.title 1 (ns com.aurellem.run.title
2 (:use (com.aurellem.gb gb-driver vbm))) 2 (:use (com.aurellem.gb gb-driver vbm))
3 3 (:use (com.aurellem.run util)))
4 4
5 (defn start [] [[] (root)]) 5 (defn start [] [[] (root)])
6 6
7 (defn-memo title 7 (defn-memo title
8 ([] (title (start))) 8 ([] (title (start)))
9 ([script] 9 ([script]
10 (->> script 10 (->> script
11 (advance [] [:a]) 11 (first-difference [] [:a] AF)
12 (advance [] [:start]) 12 (first-difference [] [:start] AF)
13 (advance [] [:a]) 13 (first-difference [] [:a] AF)
14 (advance [] [:start])))) 14 (first-difference [] [:start] AF))))
15 15
16 (defn-memo oak 16 (defn-memo oak
17 ([] (oak (title))) 17 ([] (oak (title)))
18 ([script] 18 ([script]
19 (->> script 19 (->> script
21 21
22 (defn-memo name-entry-rlm 22 (defn-memo name-entry-rlm
23 ([] (name-entry-rlm (oak))) 23 ([] (name-entry-rlm (oak)))
24 ([script] 24 ([script]
25 (->> script 25 (->> script
26 (advance [] [:a]) 26 (first-difference [] [:a] AF)
27 (advance [] [:r] DE) 27 (first-difference [] [:r] DE)
28 (play-moves 28 (play-moves
29 [[] 29 [[]
30 [:r] [] [:r] [] [:r] [] [:r] [] 30 [:r] [] [:r] [] [:r] [] [:r] []
31 [:r] [] [:r] [] [:r] [] [:d] [:a] 31 [:r] [] [:r] [] [:r] [] [:d] [:a]
32 [:l] [] [:l] [] [:l] [] [:l] [] 32 [:l] [] [:l] [] [:l] [] [:l] []
36 36
37 (defn-memo name-entry-ash 37 (defn-memo name-entry-ash
38 ([] (name-entry-ash (oak))) 38 ([] (name-entry-ash (oak)))
39 ([script] 39 ([script]
40 (->> script 40 (->> script
41 (advance [] [:d]) 41 (first-difference [] [:d] AF)
42 (advance [] [:d]) 42 (first-difference [] [:d] AF)
43 (advance [] [:a])))) 43 (first-difference [] [:a] AF))))
44 44
45 (defn-memo rival-name-entry-gary 45 (defn-memo rival-name-entry-gary
46 ([] (rival-name-entry-gary (name-entry-ash))) 46 ([] (rival-name-entry-gary (name-entry-ash)))
47 ([script] 47 ([script]
48 (->> script 48 (->> script
49 (scroll-text 5) 49 (scroll-text 5)
50 (advance [] [:d]) 50 (first-difference [] [:d] AF)
51 (advance [] [:d]) 51 (first-difference [] [:d] AF)
52 (advance [] [:a])))) 52 (first-difference [] [:a] AF))))
53 53
54 (defn-memo rival-name-entry-blue 54 (defn-memo rival-name-entry-blue
55 ([] (rival-name-entry-blue (name-entry-ash))) 55 ([] (rival-name-entry-blue (name-entry-ash)))
56 ([script] 56 ([script]
57 (->> script 57 (->> script
58 (scroll-text 5) 58 (scroll-text 5)
59 (advance [] [:d]) 59 (first-difference [] [:d] AF)
60 (advance [] [:a])))) 60 (first-difference [] [:a] AF))))
61 61
62 (defn-memo finish-title 62 (defn-memo finish-title
63 ([] (finish-title (rival-name-entry-blue))) 63 ([] (finish-title (rival-name-entry-blue)))
64 ([script] 64 ([script]
65 (->> script 65 (->> script