Ejemplo n.º 1
0
        public override void Attacked(IDefender defender)
        {
            int damage = defender.Attack(this);

            if (damage > Armor)
            {
                damage -= Armor;
            }
            else if (damage > 0)
            {
                damage = 1; //in the .txt it says "but always at least 1 point", not sure if it refers to this
            }
            GetDamage(damage);
        }
Ejemplo n.º 2
0
 public override void Attacked(IDefender defender)
 {
     GetDamage(defender.Attack(this));
 }
Ejemplo n.º 3
0
 public override void AttackedBy(IDefender defender)
 {
     //Console.WriteLine($"{defender.GetType()} {defender.Name} attacked {this.GetType()} {this.Name} ");
     defender.Attack(this);
 }
Ejemplo n.º 4
0
 public override void AttackedBy(IDefender defender)
 {
     defender.Attack(this);
 }