Exemple #1
0
 public void Execute()
 {
     defender.Defend();
 }
Exemple #2
0
 public void Defend(int power)
 {
     power   = defenseBehavior.Defend(power);
     Health -= power;
     Console.WriteLine($"{power} damage done to {this.Name}");
 }
Exemple #3
0
 // calculates the damage done andupdates the health stat
 public void Defend(int damage, Character defendingPlayer)
 {
     damage  = defendBehavior.Defend(damage, defendingPlayer);
     Health -= damage;
     Console.WriteLine($"{damage} damage was done to {this.Name}!");
 }