   []
   (state/set-state :processing-action nil))
 
+(defn- game-played
+  "After the game was deployed"
+  [data]
+  (game-loaded data)
+  (state/set-state :current-actions nil)
+  (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 :original-game-data final-data)
    (state/set-state :game-data final-data)))


  "Plays a game"
  [ev]
  (let [actions (or (state/get-state :current-actions) [])
        game (state/get-state :raw-game-data)
        player-code (get-in game ["viewed-by" "player-code"])
        token (state/get-state :token)
        game-id (state/get-state :game-id)
