                      :height (to-scale 30)
                      :on-click (fn ship-click [e]
                                  (card-click card))}]
-                   [:center [:figcaption num]]]])]]]]))])
-
+                   [:center [:figcaption num]]]])]]
+         [:tr
+          [:td {:colSpan 2}
+           [:center
+            [:button {:on-click (fn btn-click [e]
+                                  (update-active-player! @app-state))} "Pass"]]]]]]))])
 
 (defn ^:export main []
   (when-let [app (. js/document (getElementById "app"))]

   {:dangerouslySetInnerHTML
    {:__html (str "<image xlink:href=\"" (icon icon-images) "\" x=\"" (to-scale x) "\" y=\"" (to-scale y) "\" width=\"" (to-scale 30) "\" height=\"" (to-scale 30) "\" />")}}])

(defn normal-spaces []
  (apply concat
         (for [i (range 1 37)]
           (when-let [space-data (get-in @app-state [:board i])]
             (let [position (get piece-positions i)
                   space (normal-space (:x position) (:y position))
                   image (space-image (:x position) (:y position) (:icon space-data))]
               [space image]
               )))))


(defn card-click [card]
  (do
    (println "card-click" card)
    (reset! app-state (assoc @app-state :selected-card card))))


(defn main-view []
  [:center

              :error on-error}))

(defn on-play-card [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))))
  (update-active-player! @app-state))

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