From 2ab33366297943f18f9403961a3ab82a8578a0fe Mon Sep 17 00:00:00 2001 From: Richard Harrington Date: Sun, 1 Sep 2013 22:47:59 -0400 Subject: [PATCH] curtailed amount of info (And sig-figs) sent for shells --- src/robotwar/browser.clj | 4 ++-- src/robotwar/world.clj | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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]