public void Execute() { defender.Defend(); }
public void Defend(int power) { power = defenseBehavior.Defend(power); Health -= power; Console.WriteLine($"{power} damage done to {this.Name}"); }
// 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}!"); }