public void DoSideEffects(Apple[] eatenApples, Player pacMan) { bool supperApplesEaten = eatenApples.Any(x => x.Kind == (int)AppleKind.Super); if (supperApplesEaten) { if (pacMan.Game.State != (int)GameState.GameOver) { pacMan.Game.State = (int)GameState.SuperPacMan; pacMan.Game.StateChangeTime = DateTime.Now; pacMan.Game.AddGameEvent( EventType.GameStateIsSuperPacMan, pacMan.Name + " has eaten a power pellet!", pacMan.Id ); } } }