Пример #1
0
        public IWarrior AddWarrior(IWarrior warrior)
        {
            IWarrior newWarrior = warrior.GetAnInstance();

            Warriors.Add(newWarrior);

            newWarrior.PropertiesChanged += NewWarrior_PropertiesChanged;

            if (newWarrior is IHenchMen)
            {
                IHenchMen henchMan = newWarrior as IHenchMen;
                henchMan.IncreaseGroupByOne();
            }

            InvokeEvent(WarBandChanged);
            InvokeEvent(WarBandWariorListChanged);

            return(newWarrior);
        }