 
 (defn new-game []
   (with-available-moves
-    {:board (new-board)
-     :player (rand-nth players)
-     :moves {}
-     :help false
-     :scores
-     {:blue 12
-      :red 12
-      :green 12}}))
+    (with-cells-strength
+      {:board (new-board)
+       :player (rand-nth players)
+       :moves {}
+       :help false
+       :scores
+       {:blue 12
+        :red 12
+        :green 12}})))
 
 (defonce app-state (atom (new-game)))
 (def board (reagent/cursor app-state [:board]))

(def players [:blue :red :green])
(def directions [[-1 0] [1 0] [0 -1] [0 1] [-1 1] [1 1] [-1 -1] [1 -1]])

;; -----------------------------------------
;; INIT THE BOARD
;; -----------------------------------------

(def empty-board
  (let [column (vec (repeat board-height :empty))]
    (vec (repeat board-width column))))

(def all-positions
  (vec
    (for [x (range board-width)
          y (range board-height)]
      [x y])))

(defn draw-slices
  "Draw n * m slices from the collection"

      (fast-max-key
        (fn [[m converted :as move]]
          (let [new-game (play-move game m)
                diff-score (move-strength (:cells-strength game) identity move)
                losses (map #(worst-immediate-loss new-game % player) others)]
            (- diff-score (apply max losses))))
        moves))
