mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-18 19:45:20 +01:00
Fix: Replace minOf with min in PlayerProgressionManager
This commit is contained in:
parent
d0700202b7
commit
83935d35a8
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import android.content.SharedPreferences
|
|||
import com.mintris.R
|
||||
import kotlin.math.pow
|
||||
import kotlin.math.roundToInt
|
||||
import kotlin.math.minOf
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* Manages player progression, experience points, and unlockable rewards
|
||||
|
@ -96,7 +96,7 @@ class PlayerProgressionManager(context: Context) {
|
|||
fun calculateGameXP(score: Int, lines: Int, level: Int, gameTime: Long,
|
||||
tetrisCount: Int, perfectClearCount: Int): Long {
|
||||
// Base XP from score with level multiplier (capped at level 10)
|
||||
val cappedLevel = minOf(level, 10)
|
||||
val cappedLevel = min(level, 10)
|
||||
val scoreXP = (score * (1 + LEVEL_MULTIPLIER * cappedLevel)).toLong()
|
||||
|
||||
// XP from lines cleared (reduced for higher levels)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue