mirror of
https://github.com/richardharrington/robotwar.git
synced 2024-06-04 07:29:33 +00:00
curtailed amount of info (And sig-figs) sent for shells
This commit is contained in:
parent
de127b654b
commit
2ab3336629
|
@ -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)))
|
||||||
|
|
|
@ -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]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user