Mercurial > vba-clojure
comparison clojure/com/aurellem/gb/moves.clj @ 192:fd549c8f42ae
fixed compilation problems, added more functionality to pokemon-info
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 22 Mar 2012 22:35:57 -0500 |
parents | 893c753f8088 |
children | 659764a2ea40 |
comparison
equal
deleted
inserted
replaced
191:893c753f8088 | 192:fd549c8f42ae |
---|---|
189 (take-while | 189 (take-while |
190 (partial not= :end-of-moves) | 190 (partial not= :end-of-moves) |
191 (map | 191 (map |
192 move-code->move-name | 192 move-code->move-name |
193 (subvec (vec (memory state)) | 193 (subvec (vec (memory state)) |
194 start (+ start (num-moves state poke-num)))))))) | 194 start (+ start 4))))))) |
195 ([poke-num] | 195 ([poke-num] |
196 (read-moves @current-state poke-num))) | 196 (read-moves @current-state poke-num))) |
197 | 197 |
198 (defn give-moves | 198 (defn give-moves |
199 ([^SaveState state pokemon-num moves] | 199 ([^SaveState state pokemon-num moves] |
238 (Integer/parseInt "11000000" 2)) 6) | 238 (Integer/parseInt "11000000" 2)) 6) |
239 current-pp | 239 current-pp |
240 (bit-and | 240 (bit-and |
241 pp-raw | 241 pp-raw |
242 (Integer/parseInt "00111111" 2))] | 242 (Integer/parseInt "00111111" 2))] |
243 [pp-up current-pp])) | 243 {:pp-ups pp-up :current-pp current-pp})) |
244 ([pokemon-num move-num] | 244 ([pokemon-num move-num] |
245 (read-pp @current-state pokemon-num move-num))) | 245 (read-pp @current-state pokemon-num move-num))) |
246 | 246 |
247 (defn give-pp | 247 (defn give-pp |
248 ([^SaveState state pokemon-num move-num pp-ups current-pp] | 248 ([^SaveState state pokemon-num move-num pp-ups current-pp] |