comparison clojure/com/aurellem/exp/item_bridge.clj @ 176:95b2758dd517

wrote functions to read and write pokemon DV values and status
author Robert McIntyre <rlm@mit.edu>
date Wed, 21 Mar 2012 22:13:43 -0500
parents 5ce074824fac
children d63886d63b2f
comparison
equal deleted inserted replaced
175:5d9a7a0ca09a 176:95b2758dd517
49 (range ticks)))) 49 (range ticks))))
50 50
51 51
52 (defn capture-program-counter 52 (defn capture-program-counter
53 [^SaveState state ticks] 53 [^SaveState state ticks]
54 (set-state! state) 54 (tick state)
55
55 (loop [i 0 56 (loop [i 0
56 pcs []] 57 pcs []]
57 (if (= i ticks) 58 (if (= i ticks)
58 pcs 59 (set pcs)
59 (do 60 (do
60 (com.aurellem.gb.Gb/tick) 61 (com.aurellem.gb.Gb/tick)
61 (recur (inc i) 62 (recur (inc i)
62 (conj pcs (first (registers)))))))) 63 (conj pcs (first (registers))))))))
63 64