 
 (defn unit? [kind coords]
   (first (filter
-          #(= coords %)
+          #(= coords (:coords %))
           (kind (:cells (om/root-cursor app-state))))))
 
 (defn highlight-tile [e]

              (om/transact! app [:cells :red-team]
                (fn [units]
                  (map
                   #(if (= selected %) target %)
                   units)))))
          (recur)))))


(defonce app-state (atom
                    {:cells
                        {:blue-team
                         [{:coords {:x 0, :y 0} :distance 6}
                          {:coords {:x 2, :y 0} :distance 6}
                          {:coords {:x 4, :y 0} :distance 6}
                          {:coords {:x 6, :y 0} :distance 6}
                          {:coords {:x 8, :y 0} :distance 6}]
                        :red-team
                         [{:coords {:x 0, :y 8} :distance 6}
                          {:coords {:x 2, :y 8} :distance 6}
                          {:coords {:x 4, :y 8} :distance 6}
                          {:coords {:x 6, :y 8} :distance 6}
                          {:coords {:x 8, :y 8} :distance 6}]
                        :balls
                         [{:coords {:x 0, :y 4}}
                          {:coords {:x 2, :y 4}}
                          {:coords {:x 4, :y 4}}
                          {:coords {:x 6, :y 4}}
                          {:coords {:x 8, :y 4}}]}}))

(def board-size (range 0 9))
(def bench-size 4)
