   (case msg
     :new-game (swap! app-state assoc-in [:games] (new-game))
     :restart (swap! app-state update-in [:games] #(take-last 1 %))
-    :undo (swap! app-state update-in [:games] cancel-last-move #{:red :green})))
+    :undo (swap! app-state update-in [:games] cancel-last-move is-ai?)))
 
 (defn start-game-loop
   "Manage transitions between player moves, ai moves, and generic game events"

  (conj game-turns
    (turn/play-move (get-turn game-turns) coord)))

(defn cancel-last-move ;; TODO - It needs the ai: how to move it in the game? undo then undo-while
  [old-turns is-ai?]
  (let [new-turns (drop-while #(is-ai? (:player %)) (drop 1 old-turns))]
    (if (empty? new-turns)



;; -----------------------------------------
;; GAME STATE
;; -----------------------------------------

(defn new-game []
  (list (turn/new-init-turn)))

(defn get-turn
  [game-turns]
