diff --git a/app/src/main/kotlin/jackall/moncalc/activity/MainActivity.kt b/app/src/main/kotlin/jackall/moncalc/activity/MainActivity.kt index 2033338..b29cd72 100644 --- a/app/src/main/kotlin/jackall/moncalc/activity/MainActivity.kt +++ b/app/src/main/kotlin/jackall/moncalc/activity/MainActivity.kt @@ -67,15 +67,20 @@ dateRandom.add(dateEnd.get(Calendar.DATE), -Random().nextInt(dateDiff.toInt())) val drops = RealmList() - val grade = Random().nextInt(6) + val gradeId = + if (Math.random() < 0.1) { + Random().nextInt(3) + 3 + } else { + Random().nextInt(3) + } drops.add( Drop( fruitId = Random().nextInt(15), - gradeId = grade + gradeId = gradeId ) ) var specialCount: Int - if (grade >= 3) { + if (gradeId >= 3) { specialCount = 1 } else { specialCount = 0