           (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


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

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


  [game]
  (let [turn (game/current-turn game)
        ai (make-ai (:player turn))]
    (game/play-move game (best-move ai turn))))


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