예제 #1
0
 public static void WithHarryPotter(Hero hero, HarryPotter HarryPotter)
 {
     while (HarryPotter.health > 0 && hero.health > 0)
     {
         PrintTheStats(HarryPotter, hero);
         hero.YourTurn(hero.Choice(), HarryPotter);
         if (HarryPotter.health > 0)
         {
             HarryPotter.HarryPotterTurn(HarryPotter.EChoice(), hero);
             IsHeroDead(hero);
         }
     }
     Console.WriteLine("{0} was killed !", HarryPotter.name);
     Console.ReadLine();
     Console.Clear();
 }
예제 #2
0
 public static void WithKlingon(Hero hero, Klingon Klingon)
 {
     //ensures that both the player and the enemy are alive
     while (Klingon.health > 0 && hero.health > 0)
     {
         PrintTheStats(Klingon, hero);
         hero.YourTurn(hero.Choice(), Klingon);
         if (Klingon.health > 0)
         {
             Klingon.KlingonTurn(Klingon.EChoice(), hero);
             IsHeroDead(hero);
         }
     }
     Console.WriteLine("{0} was killed!", Klingon.name);
     Console.ReadLine();
     Console.Clear();
 }
예제 #3
0
            public static void WithOrk(Hero hero, Ork Ork)
            {
                while (Ork.health > 0 && hero.health > 0)
                {
                    PrintTheStats(Ork, hero);

                    hero.YourTurn(hero.Choice(), Ork);

                    if (Ork.health > 0)
                    {
                        Ork.OrkTurn(Ork.EChoice(), hero);
                        IsHeroDead(hero);
                    }
                }
                Console.WriteLine("{0} was killed!", Ork.name);
                Console.ReadLine();
                Console.Clear();
            }
예제 #4
0
        public static void WithMonster(Hero hero, Monster Monster)
        {
            while (Monster.health > 0 && hero.health > 0)
            {
                PrintTheStats(Monster, hero);

                hero.YourTurn(hero.Choice(), Monster);

                if (Monster.health > 0)
                {
                    Monster.MonsterTurn(Monster.EChoice(), hero);
                    IsHeroDead(hero);
                }
            }

            Console.WriteLine("{0} was killed !", Monster.name);
            Console.ReadLine();
            Console.Clear();
        }
예제 #5
0
        public static void WithKnight(Hero hero, Knight knight)
        {
            while (knight.health > 0 && hero.health > 0)
            {
                PrintTheStats(knight, hero);

                hero.YourTurn(hero.Choice(), knight);

                if (knight.health > 0)
                {
                    knight.KnightTurn(knight.EChoice(), hero);
                    IsHeroDead(hero);
                }
            }

            Console.WriteLine("{0} was killed!", knight.name);
            Console.ReadLine();
            Console.Clear();
        }
예제 #6
0
        public static void WithWarrior(Hero hero, Warrior warrior)
        {
            while (warrior.health > 0 && hero.health > 0)
            {
                PrintTheStats(warrior, hero);

                hero.YourTurn(hero.Choice(), warrior);

                if (warrior.health > 0)
                {
                    warrior.WarriorTurn(warrior.EChoice(), hero);
                    IsHeroDead(hero);
                }
            }

            Console.WriteLine("{0} was killed!", warrior.name);
            Console.ReadLine();
            Console.Clear();
        }