           (turn/apply-transition turn transition)
           (dec depth))))
     ))
+
+(defn- best-move
+  [ai turn]
+  (first
+    (min-max-step-by
+      second ai turn
+      (fn [coord transition]
+        (let [new-turn (turn/apply-transition turn transition)]
+          [coord (tree-score ai new-turn 1)]))
+      )))
 
 ;; -----------------------------------------
 ;; Public API

  [game]
  (let [turn (game/current-turn game)
        ai (make-ai (:player turn))]
    (:game
      (min-max-step-by
        :score ai turn
        (fn [coord _]
          (let [new-game (game/play-move game coord)
                new-turn (game/current-turn new-game)]
            {:game new-game                             ;; TODO - Not sure keeping game in memory is wise
             :score (tree-score ai new-turn 1)})))
      )))


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


(defn- min-max-step
  [ai turn on-transition]
  (min-max-step-by identity ai turn on-transition))         ;; TODO - avoid projection

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

