comparison clojure/com/aurellem/gb/pokemon.clj @ 200:1e2aa688e6e4

pokemon printing complete.
author Robert McIntyre <rlm@mit.edu>
date Fri, 23 Mar 2012 02:41:22 -0500
parents 659764a2ea40
children 53a74450dc8a
comparison
equal deleted inserted replaced
199:d4e673d09181 200:1e2aa688e6e4
229 :original-trainer OT-name 229 :original-trainer OT-name
230 :ID ID 230 :ID ID
231 :moves (mapv vector moves moves-pp) 231 :moves (mapv vector moves moves-pp)
232 232
233 ;; ephemerial 233 ;; ephemerial
234 :satus status 234 :status status
235 :stats stats 235 :stats stats
236 :experience experience 236 :experience experience
237 })) 237 }))
238 ([poke-num] 238 ([poke-num]
239 (pokemon-info @current-state poke-num))) 239 (pokemon-info @current-state poke-num)))
306 (printf 306 (printf
307 "| %-17s| %2d | %02d | %02d |\n" 307 "| %-17s| %2d | %02d | %02d |\n"
308 (.substring (str name) 1) 308 (.substring (str name) 1)
309 current-pp (max-pp name pp-ups) pp-ups))) 309 current-pp (max-pp name pp-ups) pp-ups)))
310 310
311 (println "+------------------+----+--------+--------+") 311 (println "+------------------+----+--------+--------+\n")
312 312
313 313 (println "Total Experience:" (:main-exp (:experience info)))
314 314 (if (not= (:species info) (:species2 info))
315 315 (println "\nThis pokemon has a secondary species"
316 )) 316 (str
317 "("
318 (.substring (str (:species2 info)) 1) ")\n")
319 "that does not match it's primary species."))
320 (if (not= :normal (:status info))
321 (println "\nThis pokemon is currently"
322 (.substring (str (:status info) ".") 1)))))
317 ([poke-num] 323 ([poke-num]
318 (print-pokemon @current-state poke-num))) 324 (print-pokemon @current-state poke-num)))
319 325
320 (defn give-status-all 326 (defn give-status-all
321 ([^SaveState state status] 327 ([^SaveState state status]