 
 (def ai-move-delay 1000)
 
-(defn update-game! [f & args]
-  (swap! app-state update-in [:games] conj (apply f @game args)))
+(defn play-game-turn! [move]
+  (swap! app-state update-in [:games] play-turn move))
 
 (defn- handle-ai! []
   (let [ai-algo (get @ai-players @current-player)
         move (ai-algo @game @current-player)]
-    (update-game! turn/play-move move)))
+    (play-game-turn! move)))
 
 (defn- handle-game-event!
   [msg]

  (atom {:games (new-game)
         :help false}))

(def game (reaction (first (get-in @app-state [:games]))))
(def board (reaction (turn/get-board @game)))
(def scores (reaction (turn/get-scores @game)))
(def current-player (reaction (turn/current-player @game)))

      (while true
        (alt!
          game-events ([msg] (handle-game-event! msg))
          player-events ([coord] (play-game-turn! coord))
          (async/timeout ai-move-delay) ([_] (if (is-ai? @current-player) (handle-ai!)))
          )))

