Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            System.Console.WriteLine("*** *** *** *** *** *** *** *** *** ***");
            Wizard hermione  = new Wizard("Hermione");
            Wizard millicent = new Wizard("Millicent");

            hermione.heal();
            hermione.fireball(millicent);

            System.Console.WriteLine("*** *** *** *** *** *** *** *** *** ***");
            Ninja naruto = new Ninja("Naruto");
            Ninja sakura = new Ninja("Sakura");

            naruto.steal(sakura);
            naruto.get_away();

            System.Console.WriteLine("*** *** *** *** *** *** *** *** *** ***");
            Samurai masamune = new Samurai("Masamune");
            Samurai hattori  = new Samurai("Hattori");

            hattori.death_blow(masamune);
            hattori.death_blow(masamune);
            masamune.meditate();
            System.Console.WriteLine(Samurai.how_many());
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Human fred   = new Human();
            Human george = new Human();

            fred.attack(george);

            Console.WriteLine(george.getHealth());

            Console.WriteLine();
            Console.WriteLine();

            Wizard gandalf = new Wizard();

            gandalf.fireball(fred);
            gandalf.heal();

            Ninja naruto = new Ninja();

            naruto.steal(gandalf);
            naruto.get_away();

            Samurai jack = new Samurai();

            jack.medidate();
            Samurai shigeru = new Samurai();
            Samurai yamada  = new Samurai();

            shigeru.death_blow(yamada);
            Console.WriteLine(Samurai.howMany());
        }