    {: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


(defn static-board []
  [;; board
   [:rect {:x 0 :y 0 :width (to-scale 500) :height (to-scale 300) :stroke "black" :stroke-width "0.5" :fill "burlywood"}]
   ;; jail
   [:rect {:x 0 :y 0 :width (to-scale 50) :height (to-scale 90) :stroke "black" :fill "darkgray"}]
   [:g {:dangerouslySetInnerHTML {:__html (str "<image xlink:href=\"img/jail.png\" x=0 y=0 width=\"" (to-scale 30) "\" height=\"" (to-scale 30) "\" />")}}]
   ;; ship
   [:rect {:x (to-scale 400) :y (to-scale 240) :width (to-scale 90) :height (to-scale 50) :stroke "black" :fill "sienna"}]
   [:g {:dangerouslySetInnerHTML {:__html (str "<image xlink:href=\"img/ship.png\" x=\"" (to-scale 400) "\" y=\"" (to-scale 240) "\" width=\"" (to-scale 30) "\" height=\"" (to-scale 30) "\" />")}}]
   ])

(def piece-positions

                ^{:key card}
                [:span {:style {:float "left"}}
                 [:figure
                  [:img
                   {:src (card icon-images)
                    :width (to-scale 30)
                    :height (to-scale 30)
                    :on-click (fn ship-click [e]
                                   (card-click @app-state card))}]
                  [:center [:figcaption num]]]])]]]])]])

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