refactor: Rename Tetris to Quad and fix related compilation errors

This commit is contained in:
cmclark00 2025-04-01 08:15:46 -04:00
parent ce85debfe5
commit eb962268ca
14 changed files with 139 additions and 57 deletions

View file

@ -53,7 +53,7 @@ class GameHaptics(private val context: Context) {
1 -> (50L * multiplier).toLong() // Single line: short vibration
2 -> (80L * multiplier).toLong() // Double line: slightly longer
3 -> (120L * multiplier).toLong() // Triple line: even longer
4 -> (200L * multiplier).toLong() // Tetris: longest vibration
4 -> (200L * multiplier).toLong() // Quad: longest vibration
else -> (50L * multiplier).toLong()
}
@ -61,7 +61,7 @@ class GameHaptics(private val context: Context) {
1 -> (80 * multiplier).toInt().coerceAtMost(255) // Single line: mild vibration
2 -> (120 * multiplier).toInt().coerceAtMost(255) // Double line: medium vibration
3 -> (180 * multiplier).toInt().coerceAtMost(255) // Triple line: strong vibration
4 -> 255 // Tetris: maximum vibration
4 -> 255 // Quad: maximum vibration
else -> (80 * multiplier).toInt().coerceAtMost(255)
}

View file

@ -1262,11 +1262,11 @@ class GameView @JvmOverloads constructor(
// Create new animation
pulseAnimator = ValueAnimator.ofFloat(0f, 1f, 0f).apply {
duration = when (lineCount) {
4 -> 2000L // Tetris - longer duration
3 -> 1600L // Triples
2 -> 1200L // Doubles
1 -> 1000L // Singles
else -> 1000L
1 -> 500L // Single
2 -> 1000L // Double
3 -> 1500L // Triple
4 -> 2000L // Quad - longer duration
else -> 500L
}
interpolator = LinearInterpolator()
addUpdateListener { animation ->

View file

@ -256,7 +256,7 @@ class GamepadController(
1 -> 100
2 -> 150
3 -> 200
else -> 255 // For tetris (4 lines)
else -> 255 // For quad (4 lines)
}
vibrateGamepad(RUMBLE_LINE_CLEAR_DURATION_MS, amplitude)
}