       )))
 
 (defn- focus-human-player?
+  "High level AI to decude whether the AI ally against the human player"
   [{:keys [blue red green] :as scores}]
   (let [human-score (* 1.1 blue)]
     (and (< red human-score) (< green human-score))))

    ))

(defn- best-move
  [ai turn]
  (first
    (min-max-step-by
      second ai turn
      (fn [coord transition]
        (let [new-turn (turn/next-turn turn transition)]

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

(defn- leaf-score
  "Evaluate the score of a leaf turn by looking at its transition
   In effect, it will look the score one level after"
  [ai {:keys [scores] :as turn}]
  (minimax-step ai turn
    (fn [_ transition]
      (eval-score ai (scores/update-scores scores transition))
      )))

(defn- tree-score
  "Implements the minimax recursion:
   * Call the leaf node evaluation if the depth is zero
   * Otherwise goes one level deeper"
  [ai turn depth]
  (if (zero? depth)
    (leaf-score ai turn)
    (minimax-step ai turn
      (fn [_ transition]
        (tree-score ai
          (turn/next-turn turn transition)
