Exemplo n.º 1
0
        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();
            };
        }
Exemplo n.º 2
0
 public Player(string name, GameMediator gameMediator)
 {
     this.gameMediator = gameMediator;
     Name = name;
 }