static void Main()
        {
            Warrior stamat = new Warrior();
            Priest maria = new Priest();
            Mage kircho = new Mage();

            stamat.Attack(kircho);

            Console.WriteLine(kircho.Health);
        }
Пример #2
0
        public static void Main()
        {
            Character axeWarrior = new Warrior(new Axe());
            Warrior swordWarrior = new Warrior(new Sword());
            Mage axeMage = new Mage(new Axe());
            Mage swordMage = new Mage(new Sword());

            Console.WriteLine(axeWarrior);
            Console.WriteLine(swordWarrior);
            Console.WriteLine(axeMage);
            Console.WriteLine(swordMage);
        }
Пример #3
0
        static void Main()
        {
            Axe axe = new Axe();
            Sword sword = new Sword();

            Warrior axeWarrior = new Warrior(axe);
            Warrior swordWarrior = new Warrior(sword);
            Mage axeMage = new Mage(axe);
            Mage swordMage = new Mage(sword);

            Console.WriteLine(axeWarrior);
            Console.WriteLine(swordWarrior);
            Console.WriteLine(axeMage);
            Console.WriteLine(swordMage);
        }
Пример #4
0
        static void Main()
        {
            Character warrior = new Mage(new Sword());

            Console.WriteLine(warrior);
        }