Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Wizard  wizard  = new Wizard("Wizard");
            Ninja   ninja   = new Ninja("Ninja");
            Samurai samurai = new Samurai("Samurai");

            Console.WriteLine("1. ************************************");
            Console.WriteLine("*** Init ***");
            wizard.ShowInfo();
            ninja.ShowInfo();
            samurai.ShowInfo();
            Console.WriteLine("");

            Console.WriteLine("2. ************************************");
            Console.WriteLine("*** Ninja stole from Wizard ***");
            ninja.Steal(wizard);
            wizard.ShowInfo();
            ninja.ShowInfo();
            samurai.ShowInfo();
            Console.WriteLine("");

            Console.WriteLine("3. ************************************");
            Console.WriteLine("*** Wizard attacked Ninja ***");
            wizard.Attack(ninja);
            wizard.ShowInfo();
            ninja.ShowInfo();
            samurai.ShowInfo();
            Console.WriteLine("");

            Console.WriteLine("4. ************************************");
            Console.WriteLine("*** Samurai attacked Wizard ***");
            samurai.Attack(wizard);
            wizard.ShowInfo();
            ninja.ShowInfo();
            samurai.ShowInfo();
            Console.WriteLine("");
        }
Exemplo n.º 2
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);
        }