Пример #1
0
    public void Attack(IAttakable target)
    {
        this.weapon.Attack(target);

        if (target.IsDead())
        {
            this.experience += target.GiveExperience();
        }
    }
Пример #2
0
    public void Attack(IAttakable target)
    {
        if (this.durabilityPoints <= 0)
        {
            throw new InvalidOperationException("Axe is broken.");
        }

        target.TakeAttack(this.attackPoints);
        this.durabilityPoints -= 1;
    }
Пример #3
0
 public void Attack(IAttakable target)
 {
 }