     (or (nil? current-turn)
         (= :end (first current-turn)))))
 
-(defn player-pick-role [role]
-  (case role
-    :mayor (do-mayor (calc-state))
-    nil)
-  )
+(defmulti player-pick-role identity)
+(defmethod player-pick-role :mayor [role cstate]
+  (swap! estream conj 
+         [:rolepick :mayor]
+         [:worker :bank -1]
+         [:worker (nth (:order cstate) (:role-picker cstate)) 1]))
+
+(defmethod player-pick-role :builder [role cstate]
+  (swap! estream conj 
+    [:rolepick :builder]))
+
+(defmethod player-pick-role :default [role cstate]
+  nil)
 
 (defn whose-turn []
   (let [current-turn (peek (:turns @game))

(defmethod transition :gold [etype state [dest amount]]
  (update-in state [dest etype] + amount))
(defmethod transition :building [etype state [dest buildings]]
  (assoc-in state [dest] buildings))
(defmethod transition :add-player [etype state [pname]]
  (-> state
      (update-in [:order] conj pname)

      (assoc-in [pname] {:name pname :worker 0 :gold 0 :vp 0 :field {} :building {}})))

(defmethod transition :rolepick [etype state [role]]
  (-> state
      (assoc-in [((:order state) (:role-picker state)) :role] role) 
      (assoc :current-role role)))

(defmethod transition :actiondone [etype state]
  (update-in state [:action-picker] next-player state))
