 (defn render-roles []
   [:div
    (for [role (:roles @game)]
-     [:button.btn.btn-default.rolecard {:on-click #(player-pick-role role)}
+     [:button.btn.btn-default.rolecard {:on-click #(player-pick-role role (calc-state))}
       (name role)
       [:span " - " (role role-descriptions)]])])
 

(defn add-to-turn [event]
  (swap! game update-in [:turns] add-event-to-turn event))

(defn do-mayor [cstate]
  (swap! estream conj 
         [:rolepick :mayor]
         [:worker :bank -1]
         [:worker (nth (:order cstate) (:role-picker cstate)) 1])
  )

(defn action-done []
  (swap! estream conj [:actiondone])) 

(defn do-settler [field-type i]
  (when true
    (swap! game update-in [:players 0 :fields] conj field-type)
    (if (= field-type :quarry)

(defn bank-buildings []
  (into {}
        (for [[bname bdesc] common/initial-buildings]
          [bname (select-keys bdesc [:count :cost :column])])))

(swap! estream conj
       [:good :bank :coffee 9]
