func (g *Game) handleGameStatusChange(ctx context.Context, m message.Message, send messageSender) error {
	switch m.Game.Status { // what to change the status to
	case game.InProgress:
		if err := g.handleGameStart(ctx, m, send); err != nil {
			return err
		}
	case game.Finished:
		if err := g.handleGameFinish(ctx, m, send); err != nil {
			return err
		}
	default:
		return fmt.Errorf("cannot change game state from %v", g.status)
	}
	g.handleInfoChanged(send)
	return nil
}
// handleGameStatusChange changes the status of the game.
handleGameStatusChange changes the status of the game.
// handleGameStatusChange changes the status of the game .
func (g *Game) handleGameStatusChange(ctx context.Context, m message.Message, send messageSender) error {
	switch m.Game.Status { 
	case game.InProgress:
		if err := g.handleGameStart(ctx, m, send); err != nil {
			return err
		}
	case game.Finished:
		if err := g.handleGameFinish(ctx, m, send); err != nil {
			return err
		}
	default:
		return fmt.Errorf("cannot change game state from %v", g.status)
	}
	g.handleInfoChanged(send)
	return nil
}
func ( g * Game ) handleGameStatusChange ( ctx context . Context , m message . Message , send messageSender ) error { switch m . Game . Status { case game . InProgress : if err := g . handleGameStart ( ctx , m , send ) ; err != nil { return err } case game . Finished : if err := g . handleGameFinish ( ctx , m , send ) ; err != nil { return err } default : return fmt . Errorf ( " " , g . status ) } g . handleInfoChanged ( send ) return nil }
handleGameStatusChange changes the status of the game.
handleGameStatusChange changes the status of the game .
// what to change the status to