             (default-assoc h (indexes :h) x)
             (default-assoc v (indexes :v) y)
             (default-assoc d1 (indexes :d1) x)
-            (default-assoc d2 (indexes :d2) x)))))))
-(def gen-lines (memoize gen-lines))
-
+            (default-assoc d2 (indexes :d2) x)))))))        ; Todo: if it shits bricks, look here closely.
 
 (defn build-all-lines-from-state
   [state grid-w grid-h is-first-player]

(defn negamax
  ""
  [is-first-player state got-time? grid-width grid-height ret-chan]
  (try
    (loop
        [deepness 1]
      (prn "deepness" deepness @got-time?)
      (if (and @got-time?)
        (let [point (negamax-inner state
                                   Double/NEGATIVE_INFINITY
                                   Double/POSITIVE_INFINITY

                (<= 4 (+ prev-right-streak-count prev-right-partial-streak-count)) 
                    (+ prev-right-direct-streak prev-right-streak-count)
                :else 1)

              (if (and
                    (= :min prev-left-streak-type)
                    (= 3 prev-left-direct-streak)
                    (< 0 prev-left-partial-streak-count)
                    (< 0 prev-right-partial-streak-count)
                    (= 0 prev-right-direct-streak)) 1000000 0)

              (if (and
                    (= :min prev-right-streak-type)
                    (= 3 prev-right-direct-streak)
                    (< 0 prev-right-partial-streak-count)
                    (< 0 prev-left-partial-streak-count)
                    (= 0 prev-left-direct-streak)) 1000000 0)

            )
        ; Types identiques
          (cond
