 
 (defn game-play [{:keys [game-id]}]
   (let [arena (re-frame/subscribe [:game/arena])
+        cmpnt-state (reagent/atom {:resize-fn #(resize-canvas)})
         messages (re-frame/subscribe [:game/messages])
         user (re-frame/subscribe [:current-user])
         games (re-frame/subscribe [:games])]
 
     (reagent/create-class
-     {:component-did-mount #(component-did-mount)
+     {:component-did-mount #(component-did-mount cmpnt-state)
       :component-will-mount #(component-will-mount game-id)
-      :component-will-unmount #(component-will-unmount game-id)
+      :component-will-unmount #(component-will-unmount game-id cmpnt-state)
       :display-name "game-play-panel"
       :reagent-render
       (fn []

(defonce canvas-id "arena-canvas")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Helper Methods
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


    (set! (.-width canvas-element) half-width)
    (set! (.-height canvas-element) half-width)))

(defn- show-winner-modal
  [winner]
  (re-frame/dispatch [:set-modal {:fn #(winner-modal winner)
                                  :show-overlay? false}]))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Render Methods
