   (let [actions (or (state/get-state :current-actions) [])
         current-action (state/get-state :processing-action)
         new-actions (conj actions current-action)
-        current-game (state/get-state :game-data)]
-    (println data)
-    (state/set-state :game-data (assoc current-game "battle" (get data "board")))
+        current-game (state/get-state :game-data)
+        updated-game (assoc current-game "battle" (get data "board"))]
+    (println updated-game)
+    (state/set-state :game-data updated-game)
     (state/set-state :current-actions new-actions)
-    (state/set-state :processing-action nil)))
+    (state/set-state :processing-action nil)
+    ))
 
 (defn- error-loading-action
   "Error loading action"

  [data]
  (state/set-state :loading-game nil)
  (state/set-state :player-code (get-in data ["viewed-by" "player-code"]))
  (state/set-state :game-data data))

(defn- error-loading

  (let [action (reader/read-string (get-action))
        current-actions (or (state/get-state :current-actions) [])
        new-actions (conj current-actions action)
        game (-> (state/get-state :original-game-data)
                 (assoc :actions new-actions))
        jsgame (js/encodeURIComponent (.stringify js/JSON (clj->js game)))
        url (str "http://rules.api.orionsbelt.eu/game/turn/p1?context=" jsgame)]
