                 :else c)))
 
 (defn rule-avoid-collisions [c cs]
-    (let [  collisions      (filter #(critter-collision? % c) cs)
+    (let [  collisions      (filter #(near-points? c % 20) cs)
             collision-area  (center-of-points collisions)
             no-collision?   (empty? collisions)]
         (cond   

            :else   (move-towards -10 c collision-area))))

(defn rule-match-velocity [c cs]
    (let [  other-critters  (exclude c cs)
            avg-velocity    (average-velocity other-critters)
            r               (:r avg-velocity)
            velocity        (assoc avg-velocity :r (/ r 4))
            with-v          (assoc c :velocity velocity)
            diff            (polar->cartesian velocity)]
        (subtract-point with-v diff)))

(defn critter-destination [c state]
    (let [  cs  (:critters state)]
        (-> c
            (rule-to-center cs)
            (rule-avoid-walls (:width state) (:height state))
            (rule-avoid-collisions cs)
            (rule-match-velocity cs)
            )))



            diff        (polar->cartesian velocity)]
        (subtract-point with-v diff)))

(defn near-points? [c1 c2 radius]
    (let [  diff            (abs-point (subtract-point c1 c2))
            space           {:x radius :y radius}
            {:keys [x y]}   (gt-point space diff)]
        (and (not= c1 c2) (and x y))))

(defn exclude [x xs] (filter #(not= % x) xs))

(defn rule-to-center [c cs]
   (move-towards 5 c (center-of-points cs)))

(defn rule-avoid-walls [c width height]
    (let [  {:keys [x y]}   c]
