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


(defn get-group-at
  ([{:keys [size moves]} color mv]
    (get-group-at size 
                  (moves-to-mvc moves) 
                  color 
                  #{} 
                  mv))

  ([size mvc color found mv]
  (if (= (mvc mv) color)
    (conj 
      (apply ss/union (map 
        #(get-group-at
           size 
           mvc
           color 
           (conj found mv) 
           %)
        (-> mv (get-near-cells size) set (ss/difference found))))
      mv)
    found)))

(defn get-dame [{:keys [size moves]} group] 
  (let [mvc (moves-to-mvc moves)]
  (->> group
      (map #(get-near-cells % size))

            (cond (not wid) :wid
                  (not bid) :bid))))

(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
       (not game) :no-game
       (not color) :not-a-player
       (= started 0) :not-started
