changeset 286:0e31aff20d5f

added give-empty-pokedex
author Robert McIntyre <rlm@mit.edu>
date Wed, 28 Mar 2012 06:06:00 -0500
parents 57e0314e488d
children 7918c0dcc0bd
files clojure/com/aurellem/gb/pokedex.clj
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/pokedex.clj	Wed Mar 28 05:08:24 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/pokedex.clj	Wed Mar 28 06:06:00 2012 -0500
     1.3 @@ -90,3 +90,13 @@
     1.4              (set-pokedex-captured n true)))
     1.5        state (range 1 152)))
     1.6    ([] (give-full-pokedex @current-state)))
     1.7 +
     1.8 +(defn give-empty-pokedex
     1.9 +  ([^SaveState state]
    1.10 +     (reduce
    1.11 +      (fn [state n]
    1.12 +        (-> state
    1.13 +            (set-pokedex-seen n false)
    1.14 +            (set-pokedex-captured n false)))
    1.15 +      state (range 1 152)))
    1.16 +  ([] (give-empty-pokedex @current-state)))