 (def app-state
   (atom {:gameid 0
          :log []
-         :side "Corp"
+         :side :corp
          :corp {:user nil
                 :r&d []
                 :hq []

(defn discard []
  (if (= (:side app-state) :runner) :heap :archive))

(defn gameboard [cursor owner]
  (om/component
   (sab/html
    [:div.gameboard {}
     [:div.leftpane {}
      [:div {}
       (om/build corp-stats-view (:corp cursor))
       (om/build scored-view cursor)]
      [:div {}
       (om/build scored-view cursor)
       (om/build runner-stats-view (:runner cursor))]]
     [:div.centralpane
      (om/build corp-board (:corp cursor))
      (om/build runner-board (:runner cursor))
      [:div.dashboard {}
       (om/build hand-view ((hand) cursor))
       (om/build deck-view ((deck) cursor))
       (om/build discard-view ((discard) cursor))]]
     [:div.rightpane {}
      [:div.card-zoom {}]
      (om/build log-pane (:log cursor))
      (om/build msg-input-view cursor)]])))


                  :brain-damage 0}}{}))

(defn init-game [gameid side corp runner]
  (swap! app-state assoc :gameid gameid :side (keyword (.toLowerCase side)))
  (swap! app-state assoc-in [:runner :user] (:user runner))
  (swap! app-state assoc-in [:corp :user] (:user corp)))

