Пример #1
0
 public static void DoBattle(Player player, Monster monster)
 {
     if (monster.GetType() == typeof(BossMonster))
     {
         DoAttack(player, monster);
         if (monster.Life > 0)
         {
             DoBossAttack(monster, player);
         }
         else
         {
             player.GainExperience(monster.MonsterExp);
         }
     }
     else
     {
         DoAttack(player, monster);
         if (monster.Life > 0)
         {
             DoAttack(monster, player);
         }
         else
         {
             player.GainExperience(monster.MonsterExp);
         }
     }
 }