 (defn is-terminal-state
   ""
   [state]
-  )
+  false)
 
 (defn get-value-for-state
   ""
   [state]
-  )
+  (rand-int 5))
 
 (defn generate-world-from-position
   ""

  ""
  [state alpha beta timeout is-first-player max-depth grid-width grid-height]
  (if (is-terminal-state state)
    (get-value-for-state state)
    (if (= max-depth 0)
      (heuristic state)
      (let [best Double/POSITIVE_INFINITY]
        (loop [successor-states (generate-successor-states state grid-width grid-height is-first-player)
               new-alpha alpha
               new-beta beta]
          (if (empty? successor-states)
            best
            (let [v (- (negamax-inner (first successor-states) (- new-beta) (- new-alpha) timeout (not is-first-player) (- max-depth 1) grid-width grid-height))]
              (if (> v best)
                (let [new-best v]
                  (if (> new-best new-alpha)
                    (let [ret-alpha best]
                      (if (>= ret-alpha new-beta)
                        new-best
                        (recur (rest successor-states) ret-alpha new-beta)))
                    (recur (rest successor-states) new-alpha new-beta)))
                (recur (rest successor-states) new-alpha new-beta)))))))))

      (reduce
        (fn [col [col-idx charac]]
          (case charac
            1 (assoc col true (cons [line-idx col-idx] (col true)))
            2 (assoc col false (cons [line-idx col-idx] (col false)))
            col))
        ret-map
        (map-indexed vector (first charmat)))
