 (defn- reset-actions
   "Reset the current actions being applied"
   []
+  (state/set-state :game-data (state/get-state :original-game-data))
   (state/set-state :current-actions []))
 
 (defn- action-added

  [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

(defn- game-stash
  "Shows the current stash if available"
  [game]
  (let [stash (get-stash (state/get-state :game-data))]
    (dom/div #js {:className "row"}
      (dom/div #js {:className "col-lg-3"}
        (dom/div #js {:className "bs-component"}
          (dom/table #js {:className "table table-striped table-hover"}
            (dom/caption nil "Stash")
            (apply dom/tbody nil
              (dom/tr nil
                (dom/th nil "Unit")
                (dom/th nil "Quantity"))
              (for [[unit quantity] stash]
                (dom/tr nil
                  (dom/td nil unit)
                  (dom/td nil quantity))))))))))

(defn- render-board-cell
  "Renders a board's cell"
  [game x y]
  (let [element (get-in game ["board" "elements"])]
    #_(println element))
  (dom/p #js {:className "boardCoords"} (str "[" x " " y "]")))

(defn- render-board
