示例#1
0
        static void Main(string[] args)
        {
            SuperHero superHero = new SuperHero("Super Dude", 20);

            superHero.AddPower("Spider Climbing", 50);
            superHero.AddPower("Webcasting", 40);
            superHero.AddPower("Invisibility", 40);
            superHero.AddPower("Super strength", 40);
            Console.WriteLine(superHero.ToString());
            Console.WriteLine("Karma:" + superHero.Karma);

            SuperVillian superVillian = new SuperVillian("Evil Dude", 40);

            superVillian.AddPower("Mocking the Elderly", 10);
            superVillian.AddPower("Loitering", 10);
            superVillian.AddPower("Eye Lasers", 40);
            superVillian.AddPower("Volcanic Sneeze", 50);
            Console.WriteLine(superVillian.ToString());
            Console.WriteLine("Malice:" + superVillian.Malice);
        }
        static void Main(string[] args)
        {
            //SuperHero superHero = new SuperHero("SuperHero Dude", 20);
            //superHero.AddPower("Spider Climbing", 50);
            //superHero.AddPower("Webcasting", 40);
            //superHero.AddPower("Webcasting", 40);
            ////SuperHero.DisplayPowers();

            //Console.WriteLine(superHero.ToString());
            //Console.WriteLine("karma: " + superHero.Karma);

            // For Lab 24

            SuperVillian supervillain = new SuperVillian("SuperVillain Tom", 50002321);

            supervillain.AddPower("Giving homework", 9000);
            supervillain.AddPower("Hard marker", 100000);
            supervillain.AddPower("Giving good marks", 0);
            Console.WriteLine(supervillain.ToString());
            Console.WriteLine("Malice: Wayyyy too much --> " + supervillain.Malice);
        }