func (g *Game) handleGameStart(ctx context.Context, m message.Message, send messageSender) error {
	if g.status != game.NotStarted {
		return gameWarning("can only set game status to started")
	}
	g.status = game.InProgress
	info := fmt.Sprintf("%v started the game", m.PlayerName)
	for n := range g.players {
		m := message.Message{
			Type:       message.ChangeGameStatus,
			PlayerName: n,
			Info:       info,
			Game: &game.Info{
				Status:    g.status,
				TilesLeft: len(g.unusedTiles),
			},
		}
		send(m)
	}
	return nil
}
// handleGameStart starts the game.
handleGameStart starts the game.
// handleGameStart starts the game .
func (g *Game) handleGameStart(ctx context.Context, m message.Message, send messageSender) error {
	if g.status != game.NotStarted {
		return gameWarning("can only set game status to started")
	}
	g.status = game.InProgress
	info := fmt.Sprintf("%v started the game", m.PlayerName)
	for n := range g.players {
		m := message.Message{
			Type:       message.ChangeGameStatus,
			PlayerName: n,
			Info:       info,
			Game: &game.Info{
				Status:    g.status,
				TilesLeft: len(g.unusedTiles),
			},
		}
		send(m)
	}
	return nil
}
func ( g * Game ) handleGameStart ( ctx context . Context , m message . Message , send messageSender ) error { if g . status != game . NotStarted { return gameWarning ( " " ) } g . status = game . InProgress info := fmt . Sprintf ( " " , m . PlayerName ) for n := range g . players { m := message . Message { Type : message . ChangeGameStatus , PlayerName : n , Info : info , Game : & game . Info { Status : g . status , TilesLeft : len ( g . unusedTiles ) , } , } send ( m ) } return nil }
handleGameStart starts the game.
handleGameStart starts the game .