curtailed amount of info (And sig-figs) sent for shells

This commit is contained in:
Richard Harrington 2013-09-01 22:47:59 -04:00
parent de127b654b
commit 2ab3336629
2 changed files with 5 additions and 2 deletions

View File

@ -34,6 +34,6 @@
(compact-shells [world] (compact-shells [world]
(update-in (update-in
world world
[:shells] [:shells :shell-map]
#(map (comp three-sigs-map select-shell-keys) %)))] #(map (comp three-sigs-map select-shell-keys) %)))]
(map compact-robots worlds))) (map (comp compact-shells compact-robots) worlds)))

View File

@ -10,6 +10,9 @@
(defn init-world (defn init-world
"initialize all the variables for a robot world." "initialize all the variables for a robot world."
[programs] [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 {:shells {:next-id 0
:shell-map {}} :shell-map {}}
:robots (vec (map-indexed (fn [idx program] :robots (vec (map-indexed (fn [idx program]