                [space image]
                )))))
 
+;; TODO: duplicated from server code
 (defn active-player
   "Returns the active player from the players collection by name."
   [game-state]
   (first (filter #(= (:current-player game-state) (:name %)) (:players game-state))))
+
+(defn card-click [game-state card]
+  (println "card-click" card))
 
 (defn main-view []
   [:center

                ^{:key card}
                [:span {:style {:float "left"}}
                 [:figure
                  [:img {:src (card icon-images) :width (to-scale 30) :height (to-scale 30)}]
                  [:center [:figcaption num]]]])]]]])]])

(defn on-error [{:keys [status status-text]}]

   {:x 400 :y 240}
 ])

(defn pirate-click [game-state color from-space-index]
  (println "clicked pirate:" color from-space-index))

(defn jail []
  (when-let [jail (get-in @app-state [:board 0])]
    (apply concat
