Ejemplo n.º 1
0
func Init() {
	draft.Init()
	timer_handler()

	RegisterDraftHandler("login", handle_update)
	RegisterDraftHandler("update", handle_update)
	RegisterDraftHandler("bid", handle_bid)
	RegisterDraftHandler("bid-more", handle_more_bid)
	RegisterDraftHandler("bidder", handle_bidder)
	RegisterDraftHandler("event", handle_event)
	RegisterDraftHandler("captains", handle_captains)
	RegisterDraftHandler("upcoming", handle_upcoming)
	RegisterDraftHandler("refresh", handle_refresh)
	RegisterDraftHandler("timer-end", handle_timer_end)
	RegisterDraftHandler("current-player", handle_current_player)
	// winner
	// final-ticks
}
Ejemplo n.º 2
0
func handle_refresh(msg Message, room *DraftRoom) {
	draft.Init()
	Handle(Message{Type: "update"})
}