Exemple #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());
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Human   Ashe     = new Human("Ashe");
            Wizard  Temo     = new Wizard("Temo");
            Ninja   MasterYi = new Ninja("MasterYi");
            Samurai Yasuo    = new Samurai("Yasuo");


            // ----------------------------------- Game to see points ----------------------
            MasterYi.Steal(Temo);
            Console.WriteLine("MasterYi steals from {0}. {1} goes to MasterYi!", Temo.name, MasterYi.health);
            MasterYi.get_away();
            Console.WriteLine("MasterYi tries to get away! Health decrease {0}", MasterYi.health);
            Temo.fireball(MasterYi);
            Console.WriteLine("Temo fire back at {0}, and {0} health decrease to {1}", MasterYi.name, MasterYi.health);
            Yasuo.meditate();
            Console.WriteLine("Yasuo does not want to fight! His health is {0}", Yasuo.health);

            // Console.WriteLine(count);
            // Yasuo.how_many();
        }