                            (flip-team app))
                          {:coords target}))
                       %)
-                   units))))
-              ))
+                   units))))))
           (recur)))))
 
     om/IRenderState
-    (render-state [this {:keys [move]}]
+    (render-state [this {:keys [actions]}]
       (dom/div #js {:className "container"}
         (om/build turn-view (:turn @app))
         (om/build action-view (:actions @app))

            (apply dom/tr #js {:className (border-top y)}
              (vec (for [x board-length]
                (om/build tile-view app
                  {:state {:selected-unit (om/get-state owner :selected-unit) :move move :coords {:x x :y y}}})))))))
        (bench)))))

(om/root board-view app-state

  (Math/abs (- b a)))

(defn in-range? [target selected]
  (and
   (or
     (and
      (= :blue-team (:turn @app-state))
      (<= (:y target) 7))
     (and
      (= :red-team (:turn @app-state))
      (>= (:y target) 4)))
   (<=
    (reduce
     +
     (map distance (vals target) (vals selected)))
    move-range)))

(defn turn-view [data owner]
  (reify
