Skip to content

Commit

Permalink
Merge pull request #486 from lucasnlm/fix-lint
Browse files Browse the repository at this point in the history
Fix lint
  • Loading branch information
lucasnlm authored Nov 30, 2023
2 parents dd462a3 + 3bffc76 commit 48f4dac
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import dev.lucasnlm.external.Leaderboard
import dev.lucasnlm.external.PlayGamesManager
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOf
Expand Down Expand Up @@ -780,11 +779,9 @@ open class GameViewModel(
}
}

private fun matchExpectedValueStoch(x: Double): Int {

private fun matchExpectedValueStoch(value: Double): Int {
val randomNum = (1..100).random()

return if (randomNum <= (x - x.toInt())*100) x.toInt() + 1 else x.toInt()
return if (randomNum <= (value - value.toInt()) * 100) value.toInt() + 1 else value.toInt()
}

private fun calcRewardHints(): Int {
Expand Down

0 comments on commit 48f4dac

Please sign in to comment.