Ejemplo n.º 1
0
func broadcastStart(currentGame *game.Game) {
	// Initial drop will be the same for both players.
	var message = message.NewMessage(message.MESSAGE_TYPE_START,
		message.StartMessagePart{currentGame.InitialDrops()})

	for _, playerId := range currentGame.Players {
		websocket.JSON.Send(connections[playerId], message)
	}
}