 
 (defn available-moves-at
   "Provides the list of moves that can be done from a cell"
-  [board [x y]]
-  (eduction (keep #(available-cells-by-dir board [x y] %)) directions))
+  [board point]
+  (eduction (keep #(available-cells-by-dir board point %)) directions))
 
 (defn take-empty-cell-move
   "Create a move to take an empty cell" 

  (:require [reagent.core :as reagent :refer [atom]]))

(enable-console-print!)


;; -----------------------------------------
;; TODO - Performance can be increased by using deftype / defrecord
;; TODO - Define a point
;; TODO - Define a move
;; -----------------------------------------

(defrecord B [x y])

(defn perf-test
  []
  (let [r (vec (range 10000))]
    (time
      (doall
        (map #(.-x %) (map #(B. %1 %2) r r))
        ))
    (time
      (doall
        (map #(:x %) (map #(B. %1 %2) r r))
        ))
    (time
      (doall
        (map #(first %) (map vector r r))
        ))
    (time
      (doall
        (map #(:x %) (map (fn [a b] {:x a :y b}) r r))
        ))
		;;"Elapsed time: 14.975000 msecs"
		;;"Elapsed time: 20.245000 msecs"
		;;"Elapsed time: 21.190000 msecs"
		;;"Elapsed time: 22.085000 msecs"
    nil))


;; -----------------------------------------

       (str (name p) ": " (get scores p))])
    ))

(defn run-game []
  [:h1 "Triboard"
   [show-scores @scores @current-player]
   (into
