public Coach(GameMediator gameMediator) { this._gameMediator = gameMediator; gameMediator._ev += (sender, args) => { if (args is PlayerScoredEventArgs s && s.GoalsScored < 3) { Console.WriteLine($"good job {s.PlayerName}"); } args.Print(); }; }
public Player(string name, GameMediator gameMediator) { this.gameMediator = gameMediator; Name = name; }