             (cond (not wid) :wid
                   (not bid) :bid))))
 
-(defn decide-move 
+(defn decide-move
   [{:keys [moves bid wid ended started] :as game} uid mv]
   (let [bwid (next-bwid game uid)
         color (cond (= bwid :bid) "b" (= bwid :wid) "w")]
     {:bwid bwid
      :color color
      :status
-     (cond 
+     (cond
        (not game) :no-game
        (not color) :not-a-player
        (= started 0) :not-started

      (filter (comp not (partial get mvc)))
      count)))

(defn find-to-eat [{:keys [size moves] :as game} color mv] 
  (let [op-color (if (= color "b") "w" "b")]
    (->> mv
         (#(get-near-cells % size))

  (storage/insert-move! game color mv)
  (let [gid (:gid game)
        updated (storage/get-game gid)]
    (if (should-end? updated)
      (storage/end-game! gid)
      (doall (map storage/mark-eaten! (find-to-eat updated color mv))))))

(defn move! [game uid mv]
  (log/debug "move gid" (:gid game) uid mv)
  (let [gid (:gid game)
        {:keys [status color bwid] :as stat} (decide-move game uid mv)]
    (log/debug "move status" stat)
    (if bwid (storage/set-player! gid bwid uid))
    (if (= status :ok) (add-move! game color mv))
    status))
