示例#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();
            };
        }
示例#2
0
 public Player(string name, GameMediator gameMediator)
 {
     this.gameMediator = gameMediator;
     Name = name;
 }