Commit bbd640ad authored by Jorn W. Janneck's avatar Jorn W. Janneck

Added fix by Anders Törnkvist that makes sure all species are, in fact,...

Added fix by Anders Törnkvist that makes sure all species are, in fact, included in the initial configuration of a tournament.
parent 92b66b78
......@@ -63,14 +63,13 @@
[
world (create-world MaxCellEnergy)
world-ref (ref world)
population (apply hash-map
(interleave
(for [s (keys genesis)] (random-location))
(for [s (keys genesis)]
(struct Amoeba (genesis s) s MaxAmoebaEnergy MaxAmoebaHealth)
)
)
)
population (some #(do % (let [pop (apply hash-map
(interleave
(for [s (keys genesis)] (random-location))
(for [s (keys genesis)]
(struct Amoeba (genesis s) s MaxAmoebaEnergy MaxAmoebaHealth)))
)]
(and (= (count genesis) (count pop)) pop))) (range))
population-ref (ref population)
species-ref (ref (keys genesis))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment