 (defn new-board
   "Creates a new board with initial positions of each players"
   []
-  {:post [(board? %)]}
   (reduce
     (fn [r [color point]] (assoc-in r point color))
     empty-board (init-positions)))

  (eduction
    (filter #(= (get-cell-at board %) :empty))
    cst/all-positions))

;; Public Types
;; -----------------------------------------

(s/def ::board (s/coll-of (s/coll-of cst/cell? :count 11) :count 16))
(s/def ::coord (s/tuple integer? integer?))

(s/fdef new-board :ret ::board)

(s/fdef to-iterable
  :args (s/cat :board ::board)
  :ret (s/coll-of (s/tuple ::coord cst/cell?)))

(s/fdef empty-cells
  :args (s/cat :board ::board)
  :ret (s/coll-of ::coord))

(defn board?
  "A board is a vector of vector of cells"
