File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
common/src/main/java/dev/lucasnlm/antimine/common/level/viewmodel Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ import dev.lucasnlm.external.Leaderboard
3434import dev.lucasnlm.external.PlayGamesManager
3535import kotlinx.coroutines.Dispatchers
3636import kotlinx.coroutines.flow.Flow
37- import kotlinx.coroutines.flow.collect
3837import kotlinx.coroutines.flow.filterNotNull
3938import kotlinx.coroutines.flow.flow
4039import 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 {
You can’t perform that action at this time.
0 commit comments