func (l *Lobby) handleGameInfoChanged(m message.Message, socketRunnerIn chan<- message.Message) {
	if m.Game == nil {
		m2 := message.Message{
			Type:       message.SocketError,
			Info:       "cannot update game info when no game is provided",
			PlayerName: m.PlayerName,
		}
		message.Send(m2, socketRunnerIn, l.Debug, l.log)
		l.log.Printf(m2.Info)
		return
	}
	switch m.Game.Status {
	case game.Deleted:
		delete(l.games, m.Game.ID)
	default:
		l.games[m.Game.ID] = *m.Game
	}
	infos := l.gameInfos()
	m2 := message.Message{
		Type:  message.GameInfos,
		Games: infos,
	}
	message.Send(m2, socketRunnerIn, l.Debug, l.log)
}
// handleGameInfo updates the game info for the game.
handleGameInfo updates the game info for the game.
// handleGameInfo updates the game info for the game .
func (l *Lobby) handleGameInfoChanged(m message.Message, socketRunnerIn chan<- message.Message) {
	if m.Game == nil {
		m2 := message.Message{
			Type:       message.SocketError,
			Info:       "cannot update game info when no game is provided",
			PlayerName: m.PlayerName,
		}
		message.Send(m2, socketRunnerIn, l.Debug, l.log)
		l.log.Printf(m2.Info)
		return
	}
	switch m.Game.Status {
	case game.Deleted:
		delete(l.games, m.Game.ID)
	default:
		l.games[m.Game.ID] = *m.Game
	}
	infos := l.gameInfos()
	m2 := message.Message{
		Type:  message.GameInfos,
		Games: infos,
	}
	message.Send(m2, socketRunnerIn, l.Debug, l.log)
}
func ( l * Lobby ) handleGameInfoChanged ( m message . Message , socketRunnerIn chan <- message . Message ) { if m . Game == nil { m2 := message . Message { Type : message . SocketError , Info : " " , PlayerName : m . PlayerName , } message . Send ( m2 , socketRunnerIn , l . Debug , l . log ) l . log . Printf ( m2 . Info ) return } switch m . Game . Status { case game . Deleted : delete ( l . games , m . Game . ID ) default : l . games [ m . Game . ID ] = * m . Game } infos := l . gameInfos ( ) m2 := message . Message { Type : message . GameInfos , Games : infos , } message . Send ( m2 , socketRunnerIn , l . Debug , l . log ) }
handleGameInfo updates the game info for the game.
handleGameInfo updates the game info for the game .