    (when-let [active-player (active-player @app-state)]
      (let [{:keys [color cards] player-name :name} active-player
            card-groups (frequencies cards)]
-       [:div
+       [:div {:style {:margin-right 10}}
         [:table
          {:class "t1"}
          [:tbody

      :on-click (fn button-click [e]
                  (new-game!))}
     "New Game"]]
   [:div
    (-> [:svg
         {:view-box (str "0 0 " (to-scale 501) " " (to-scale 301))
          :width (to-scale 501)

              :handler on-update-active-player
              :error on-error}))

;; TODO: figure out a way to make this work elegantly with callbacks
;; swiped from server code
(defn game-over?
  "Returns truthy if a player has 6 pirates on the ship; otherwise nil."
  [board]
  (let [ship (first (filter #(= :ship (:icon %)) board))
        pirate-counts-by-color (frequencies (:pirates ship))]
    (some #(>= (second %) 6) pirate-counts-by-color)))

(defn end-game! []
  (reset! app-state (assoc @app-state :game-over true)))

(defn on-play-card [response]
  (let [board (:board response)]
    (reset! app-state (assoc @app-state :board (:board response)
                                        :discard-pile (:discard-pile response)
                                        :players (conj (remove #{(active-player @app-state)} (:players @app-state)) (:player response))))
    (reset! app-state (dissoc @app-state :selected-card))
    (if (game-over? board)
      (end-game!)
      (update-active-player! @app-state))))

(defn play-card! [player card from-space board discard-pile]
  (ajax/POST "http://localhost:3000/play-card"
