Example #1
0
        public void Attach(Warrior warrior)
        {
            if (warrior == null)
            {
                throw new InvalidOperationException("Warrior cannot be null!");
            }

            this.attackers.Add(warrior);
        }
Example #2
0
        public bool Detach(Warrior warrior)
        {
            if (warrior == null)
            {
                throw new InvalidOperationException("Warrior cannot be null!");
            }

            var removed = this.attackers.Remove(warrior);
            return removed;
        }
 public void Detach(Warrior warrior)
 {
     this.Warriors.Remove(warrior);
 }
 public void Attach(Warrior warrior)
 {
     this.Warriors.Add(warrior);
 }
Example #5
0
 public void Detach(Warrior warrior)
 {
     this.Warriors.Remove(warrior);
 }
Example #6
0
 public void Attach(Warrior warrior)
 {
     this.Warriors.Add(warrior);
 }