Skip to content

Commit 48f4dac

Browse files
authored
Merge pull request #486 from lucasnlm/fix-lint
Fix lint
2 parents dd462a3 + 3bffc76 commit 48f4dac

File tree

1 file changed

+2
-5
lines changed
  • common/src/main/java/dev/lucasnlm/antimine/common/level/viewmodel

1 file changed

+2
-5
lines changed

common/src/main/java/dev/lucasnlm/antimine/common/level/viewmodel/GameViewModel.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import dev.lucasnlm.external.Leaderboard
3434
import dev.lucasnlm.external.PlayGamesManager
3535
import kotlinx.coroutines.Dispatchers
3636
import kotlinx.coroutines.flow.Flow
37-
import kotlinx.coroutines.flow.collect
3837
import kotlinx.coroutines.flow.filterNotNull
3938
import kotlinx.coroutines.flow.flow
4039
import kotlinx.coroutines.flow.flowOf
@@ -780,11 +779,9 @@ open class GameViewModel(
780779
}
781780
}
782781

783-
private fun matchExpectedValueStoch(x: Double): Int {
784-
782+
private fun matchExpectedValueStoch(value: Double): Int {
785783
val randomNum = (1..100).random()
786-
787-
return if (randomNum <= (x - x.toInt())*100) x.toInt() + 1 else x.toInt()
784+
return if (randomNum <= (value - value.toInt()) * 100) value.toInt() + 1 else value.toInt()
788785
}
789786

790787
private fun calcRewardHints(): Int {

0 commit comments

Comments
 (0)