   (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)
+        game (state/get-state :raw-game-data)
         player-code (get-in game ["viewed-by" "player-code"])
         game (-> game
                  (assoc :actions new-actions)

  []
  (state/set-state :processing-action nil))

(defn- game-deployed
  "After the game was deployed"
  [data]
  (game-played data))

(defn- game-played
  "After the game was deployed"
  [data]
  (state/set-state :game-data data)
  (state/set-state :original-game-data data)
  (state/set-state :current-actions nil)
  (state/set-state :processing-action nil))

(defn- deploy-game
  "Deploys a game"

  (state/set-state :loading-game nil)
  (state/set-state :player-code (get-in data ["viewed-by" "player-code"]))
  (let [final-data (normalize-board data)]
    (state/set-state :raw-game-data data)
    (state/set-state :original-game-data final-data)
    (state/set-state :game-data final-data)))

