Пример #1
0
 public int getRandomTask(int diff) {
   if (diff == EASY_TASK) {
     return easyTask.get(Misc.random(easyTask.size() - 1));
   } else if (diff == MEDIUM_TASK) {
     return mediumTask.get(Misc.random(mediumTask.size() - 1));
   } else if (diff == HARD_TASK) {
     return hardTask.get(Misc.random(hardTask.size() - 1));
   } else if (diff == BOSS_TASK) {
     return bossTask.get(Misc.random(bossTask.size() - 1));
   }
   return easyTask.get(Misc.random(easyTask.size() - 1));
 }
Пример #2
0
 public int getTaskAmount(int diff) {
   switch (diff) {
     case 1:
       return 25 + Misc.random(75);
     case 2:
       return 45 + Misc.random(55);
     case 3:
       return 35 + Misc.random(65);
     case 4:
       return 5 + Misc.random(15);
   }
   return 50 + Misc.random(60);
 }