diff --git a/src/robotwar/browser.clj b/src/robotwar/browser.clj index 57de474..c5283a1 100644 --- a/src/robotwar/browser.clj +++ b/src/robotwar/browser.clj @@ -34,6 +34,6 @@ (compact-shells [world] (update-in world - [:shells] + [:shells :shell-map] #(map (comp three-sigs-map select-shell-keys) %)))] - (map compact-robots worlds))) + (map (comp compact-shells compact-robots) worlds))) diff --git a/src/robotwar/world.clj b/src/robotwar/world.clj index 567a3cb..a14b752 100644 --- a/src/robotwar/world.clj +++ b/src/robotwar/world.clj @@ -10,6 +10,9 @@ (defn init-world "initialize all the variables for a robot world." [programs] + ; TODO: have :shells and :next-shell-id be top-level fields, + ; and dispense with :shell-map. Need to changes stuff throughout + ; the project; search for shells and shell-map in clj and js. {:shells {:next-id 0 :shell-map {}} :robots (vec (map-indexed (fn [idx program]