예제 #1
0
        public void Test_knife_Empower()
        {
            Weapon knife = new Knife();

            Console.WriteLine($"{knife.GetName()} attack power: {knife.AttackPower()} ");

            knife = new Long(knife);
            Console.WriteLine($"{knife.GetName()} attack power: {knife.AttackPower()} ");

            knife = new Sharp(knife);
            Console.WriteLine($"{knife.GetName()} attack power: {knife.AttackPower()} ");

            knife = new Toxic(knife);
            Console.WriteLine($"{knife.GetName()} attack power: {knife.AttackPower()} ");

            knife = new Legendary(knife);
            Console.WriteLine($"{knife.GetName()} attack power: {knife.AttackPower()} ");
        }
예제 #2
0
        public void Test_Sword_Empower()
        {
            Weapon sword = new Sword();

            Console.WriteLine($"{sword.GetName()} attack power: {sword.AttackPower()} ");

            sword = new Long(sword);
            Console.WriteLine($"{sword.GetName()} attack power: {sword.AttackPower()} ");

            sword = new Sharp(sword);
            Console.WriteLine($"{sword.GetName()} attack power: {sword.AttackPower()} ");

            sword = new Toxic(sword);
            Console.WriteLine($"{sword.GetName()} attack power: {sword.AttackPower()} ");

            sword = new Legendary(sword);
            Console.WriteLine($"{sword.GetName()} attack power: {sword.AttackPower()} ");
        }