static void Main(string[] args)
        {
            // Console.WriteLine("Hello World!");
            Human   roman = new Human("Roman");
            Human   lee   = new Human("lee");
            Wizard  bob   = new Wizard("Bob");
            Wizard  frank = new Wizard("Frank");
            Ninja   alex  = new Ninja("Alex");
            Samurai cat   = new Samurai("KOT");

            roman.Attack(lee);
            Human lendon = new Human("Lendon", 5, 7, 5, 90);

            roman.Attack(lendon);
            Console.WriteLine($"Lendon health: {lendon.Health}");
            Console.WriteLine(lee.Health);
            lendon.Attack(roman);
            Console.WriteLine($"Roman health: {roman.Health}");
            bob.Attack(frank);
            frank.Attack(roman);
            bob.Attack(lee);
            alex.Attack(roman);
            Console.WriteLine($"Roman dexterity is: {roman.Dexterity}");
            cat.Meditate();
            cat.Attack(roman);
            frank.Heal(roman);
            lee.Attack(cat);
            alex.Attack(frank);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Fighter Ryan    = new Fighter("Ryan");
            Fighter Batman  = new Fighter("Batman", 10, 10, 10, 250);
            Wizard  IceKing = new Wizard("Ice King");
            Ninja   Brian   = new Ninja("Ninja Brian");

            Brian.Attack(Brian);
            Brian.Attack(Batman);
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Human   Player    = new Human("Player");
            Human   Enemy     = new Human("Enemy", 5, 5, 5, 1055);
            Wizard  AllyOne   = new Wizard("Gandalf");
            Ninja   AllyTwo   = new Ninja("Sekiro");
            Samurai AllyThree = new Samurai("Mr. Samurai");

            Console.WriteLine(AllyThree.Health);
            Enemy.Attack(AllyThree);
            Console.WriteLine(AllyThree.Health);
            AllyThree.Meditate();
            Console.WriteLine(AllyThree.Health);
            AllyOne.Attack(Enemy);
            AllyTwo.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyThree.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyThree.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyThree.Attack(Enemy);
            Console.WriteLine(Enemy.Health);
            AllyOne.Heal(Enemy);
            Console.WriteLine(Enemy.Health);
            Console.WriteLine(AllyTwo.Health);
            Enemy.Attack(AllyTwo);
            Console.WriteLine(AllyTwo.Health);
            Enemy.Attack(AllyTwo);
            Console.WriteLine(AllyTwo.Health);
            AllyTwo.Steal(Enemy);
            Console.WriteLine(AllyTwo.Health);
            Console.WriteLine(Enemy.Health);
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Wizard  wizard  = new Wizard("Harry");
            Ninja   ninja   = new Ninja("Naruto");
            Samurai samurai = new Samurai("Jack");

            Console.WriteLine($"Yer a Wizard, {wizard.Name}!");
            Console.WriteLine($"{ninja.Name} is Ninja who wants to be Hokage.");
            Console.WriteLine($"Samurai {samurai.Name} must defeat the evil Aku!");

            Console.WriteLine(wizard.Health);
            Console.WriteLine(ninja.Health);
            Console.WriteLine(samurai.Health);

            wizard.Attack(ninja);
            ninja.Attack(samurai);
            samurai.Attack(wizard);

            wizard.Heal(wizard);
            ninja.Steal(samurai);
            samurai.Meditate();

            Console.WriteLine(wizard.Health);
            Console.WriteLine(ninja.Health);
            Console.WriteLine(samurai.Health);
        }
        static void Main(string[] args)
        {
            Wizard  JoeWiz = new Wizard("Joe Wizard");
            Ninja   JoeNin = new Ninja("Joe Ninja");
            Samurai JoeSam = new Samurai("Joe Samurai");

            System.Console.WriteLine($"{JoeWiz.Name}'s health is: {JoeWiz.Health}");
            System.Console.WriteLine($"{JoeNin.Name}'s health is: {JoeNin.Health}");
            System.Console.WriteLine($"{JoeSam.Name}'s health is: {JoeSam.Health}");
            JoeWiz.Attack(JoeSam);
            System.Console.WriteLine("\n");
            System.Console.WriteLine($"{JoeWiz.Name}'s health is: {JoeWiz.Health}");
            System.Console.WriteLine($"{JoeNin.Name}'s health is: {JoeNin.Health}");
            System.Console.WriteLine($"{JoeSam.Name}'s health is: {JoeSam.Health}");
            JoeNin.Attack(JoeWiz);
            System.Console.WriteLine("\n");
            System.Console.WriteLine($"{JoeWiz.Name}'s health is: {JoeWiz.Health}");
            System.Console.WriteLine($"{JoeNin.Name}'s health is: {JoeNin.Health}");
            System.Console.WriteLine($"{JoeSam.Name}'s health is: {JoeSam.Health}");
            JoeWiz.Heal(JoeWiz);
            System.Console.WriteLine("\n");
            System.Console.WriteLine($"{JoeWiz.Name}'s health is: {JoeWiz.Health}");
            System.Console.WriteLine($"{JoeNin.Name}'s health is: {JoeNin.Health}");
            System.Console.WriteLine($"{JoeSam.Name}'s health is: {JoeSam.Health}");
            JoeSam.Meditate();
            System.Console.WriteLine("\n");
            System.Console.WriteLine($"{JoeWiz.Name}'s health is: {JoeWiz.Health}");
            System.Console.WriteLine($"{JoeNin.Name}'s health is: {JoeNin.Health}");
            System.Console.WriteLine($"{JoeSam.Name}'s health is: {JoeSam.Health}");
            JoeNin.Steal(JoeSam);
            System.Console.WriteLine("\n");
            System.Console.WriteLine($"{JoeWiz.Name}'s health is: {JoeWiz.Health}");
            System.Console.WriteLine($"{JoeNin.Name}'s health is: {JoeNin.Health}");
            System.Console.WriteLine($"{JoeSam.Name}'s health is: {JoeSam.Health}");
        }
        static void Main(string[] args)
        {
            Human alfie = new Human("Alfie Peters");

            alfie.Display();

            Console.WriteLine("====================================");
            Human kenny = new Human("Kenny Omega", 5, 7, 8, 100);

            kenny.Display();

            alfie.Attack(kenny);
            Console.WriteLine("====================================");

            kenny.Attack(alfie);
            Console.WriteLine("====================================");

            Ninja tozawa = new Ninja("Akira Tozawa");

            tozawa.Display();
            Console.WriteLine("====================================");

            Wizard merlin = new Wizard("Merlin");

            merlin.Display();
            Console.WriteLine("====================================");

            Samurai elsam = new Samurai("El Samurai");

            elsam.Display();
            Console.WriteLine("====================================");

            merlin.Attack(elsam);
            Console.WriteLine("====================================");

            tozawa.Attack(alfie);
            Console.WriteLine("====================================");

            elsam.Attack(kenny);
            Console.WriteLine("====================================");

            merlin.Heal(alfie);
            Console.WriteLine("====================================");

            elsam.Meditate();
            Console.WriteLine("====================================");

            tozawa.Steal(elsam);
            Console.WriteLine("====================================");

            tozawa.Steal(alfie);
            Console.WriteLine("====================================");
        }
        static void Main(string[] args)
        {
            //Human assignment
            Human human1 = new Human("a");
            Human human2 = new Human("b", 3, 5, 6, 200);

            Console.WriteLine(human2.Attack(human1));

            //Wizard, Ninja, Warrior assignment
            Wizard  wi1 = new Wizard("Wiz");
            Ninja   n1  = new Ninja("Nin");
            Warrior wr1 = new Warrior("Wa");

            wi1.Heal(wr1);
            wi1.Heal(n1);
            wi1.Heal(wi1);
            n1.Steal(wr1);
            wr1.Meditate();
            wr1.Attack(n1);
            wi1.Attack(wr1);
            n1.Attack(wi1);
        }
Exemple #8
0
        static void Main(string[] args)
        {
            Human   me      = new Human("Justin", 4, 5, 2, 120);
            Wizard  wizard  = new Wizard("Wizard");
            Ninja   ninja   = new Ninja("Ninja");
            Samurai samurai = new Samurai("Samurai");

            me.Attack(wizard);
            wizard.Attack(me);
            wizard.Heal(me);
            ninja.Attack(me);
            ninja.Steal(me);
            samurai.Attack(me);
            samurai.Attack(me);
            wizard.Heal(me);
            me.Attack(ninja);
            me.Attack(samurai);
            samurai.Meditate();
            samurai.Attack(ninja);
            samurai.Attack(ninja);
            samurai.Attack(ninja);
            samurai.Attack(ninja);
        }
Exemple #9
0
        static void Main(string[] args)
        {
            Wizard  Wizard1  = new Wizard("Gandalf");
            Ninja   Ninja1   = new Ninja("Denede");
            Samurai Samurai1 = new Samurai("Axor");

            Console.WriteLine($"{Wizard1.Name} attacked {Ninja1.Name} and {Ninja1.Name} has {Wizard1.Attack(Ninja1)} left");
            Console.WriteLine($"{Ninja1.Name} attacked {Samurai1.Name} and {Samurai1.Name} has {Ninja1.Attack(Samurai1)} left");
            Console.WriteLine(Samurai1.Meditate());
            Console.WriteLine($"{Samurai1.Name} has {Samurai1.health} remaining");
        }