not crashing any more! collision detection not working, though.

This commit is contained in:
Richard Harrington 2013-08-30 02:32:42 -04:00
parent dd0d06446e
commit 50e9fa6f68

View File

@ -83,18 +83,16 @@
total-colliding-idxs-y (if (not-empty colliding-enemy-idxs-y)
(conj colliding-enemy-idxs-y robot-idx)
#{})
new-robots-v-x (map (fn [rob]
(if (total-colliding-idxs-x rob)
(assoc rob :v-x 0)
rob))
robots)
new-robots-v-y (map (fn [rob]
(if (total-colliding-idxs-y rob)
(assoc rob :v-y 0)
rob))
new-robots-v-x)]
(pprint new-robots-v-y)
(println (count new-robots-v-y))
new-robots-v-x (mapv (fn [rob]
(if (total-colliding-idxs-x rob)
(assoc rob :v-x 0.0)
rob))
robots)
new-robots-v-y (mapv (fn [rob]
(if (total-colliding-idxs-y rob)
(assoc rob :v-y 0.0)
rob))
new-robots-v-x)]
(assoc world :robots new-robots-v-y)))
(defn tick-robot