Beispiel #1
0
        static void Main(string[] args)
        {
            Human  h = new Human("Mina");
            Wizard w = new Wizard("Nate");
            Ninja  n = new Ninja("Wes");

            Console.WriteLine(h.health);
            Console.WriteLine(w.health);
            w.heal();
            w.firebal(h);
            Console.WriteLine(n.health);
            n.get_away();
            Console.WriteLine(n.health);
        }
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Human   guy   = new Human("Guy");
            Wizard  wiz   = new Wizard("Wiz");
            Ninja   ninja = new Ninja("Ninja");
            Samurai sam   = new Samurai("Sam");


            wiz.Attack(guy);
            wiz.Heal(guy);
            wiz.Heal(guy);
            wiz.Heal(guy);

            ninja.Attack(guy);
            ninja.Attack(guy);
            ninja.Attack(guy);
            ninja.Attack(guy);
            ninja.Attack(guy);

            sam.Attack(wiz);
            sam.Attack(wiz);
        }