Fix explosion animation

This commit is contained in:
Lucas Lima 2020-05-07 10:12:59 -03:00
parent 45c05855fa
commit 56e3a90847
No known key found for this signature in database
GPG key ID: C828A958035D9C34

View file

@ -271,7 +271,8 @@ class GameViewModel(
suspend fun gameOver() {
levelFacade.run {
analyticsManager.sentEvent(Analytics.GameOver(clock.time(), getScore()))
val delayMillis = explosionDelay() / levelFacade.mines.count().coerceAtLeast(10)
val explosionTime = (explosionDelay() / levelFacade.mines.count().coerceAtLeast(10))
val delayMillis = explosionTime.coerceAtLeast(25L)
findExplodedMine()?.let { exploded ->
takeExplosionRadius(exploded).forEach {