Пример #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Making SOLID!");
            PlayerManagement playerManager = new PlayerManagement();

            Fighter player1 = new Fighter("Raegar", 14, 3, 7);
            Wizard  player2 = new Wizard("Althoif", 4, 16, 6);

            playerManager.AddPlayer(player1);
            playerManager.AddPlayer(player2);

            playerManager.DisplayPlayers();

            player2.CastDefensiveSpell();
            player1.EquipWeapon(new Hammer(10));
            player1.Attack(player2);


            Console.WriteLine();
            playerManager.DisplayPlayers();
        }
Пример #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Breaking SOLID!");
            PlayerManagement playerManager = new PlayerManagement();

            Fighter p1 = new Fighter(PlayerClass.Fighter, "Raegar", 14, 3, 7);
            Wizard  p2 = new Wizard(PlayerClass.Wizard, "Althoif", 4, 16, 6);
            Paladin p3 = new Paladin(PlayerClass.Wizard, "Elliot Bringer of Justice", 4, 16, 6);

            playerManager.AddPlayer(p1);
            playerManager.AddPlayer(p2);
            playerManager.AddPlayer(p3);

            playerManager.DisplayPlayers();

            p2.CastDefensiveSpell();
            p1.Attack(p2);


            Console.WriteLine();
            playerManager.DisplayPlayers();
        }