comparison clojure/com/aurellem/exp/pokemon.clj @ 151:ced1c4cd1eea

fix stackoverflow error.
author Robert McIntyre <rlm@mit.edu>
date Tue, 20 Mar 2012 00:40:33 -0500
parents 544a97ac3d8a
children 9367bb5e55e6
comparison
equal deleted inserted replaced
150:544a97ac3d8a 151:ced1c4cd1eea
506 (assert (<= 0 n (dec (party-number state)))) 506 (assert (<= 0 n (dec (party-number state))))
507 (assert (<= 0 new-id 0xFFFF)) 507 (assert (<= 0 new-id 0xFFFF))
508 (set-memory-range 508 (set-memory-range
509 state 509 state
510 (OT-ID-addresses n) 510 (OT-ID-addresses n)
511 [(bit-and new-id 0xFF00) 511 [(bit-shift-right (bit-and new-id 0xFF00) 8)
512 (bit-and new-id 0xFF)])) 512 (bit-and new-id 0xFF)
513 ]))
513 ([n new-id] 514 ([n new-id]
514 (set-pokemon-id n new-id))) 515 (set-pokemon-id @current-state n new-id)))
515 516