     (throw (ex-info "Specified destination is not a valid move"
                     {:q q :r r}))))
 
-;; Moveable
-;; - member of active faction
-;; - not repaired
-;; - not capturing
-;; - hasn't attacked
-
 (defn check-can-move [db game unit]
   (check-unit-current db game unit)
   (when (= (:unit/round-built unit) (:game/round game))

      (and capturing (= capture-round (:game/round game)))
      (into (end-turn-capture-tx db game unit)))))

(defn end-turn-tx [db game]
  (let [starting-faction (qe '[:find ?f
                               :in $ ?g
                               :where

      :unit/q to-q
      :unit/r to-r}]))

;; TODO: check move is valid
(defn move-tx
  "Returns a transaction that updates the unit's location and move count."
  ([db game unit to-terrain]
   (let [new-move-count (inc (get unit :unit/move-count 0))
         [to-q to-r] (terrain-hex to-terrain)]
     (check-can-move db game unit)
     [{:db/id (e unit)
       :unit/game-pos-idx (game-pos-idx game to-q to-r)
       :unit/q to-q
