Rename Retry and reformat Analytics

This commit is contained in:
Lucas Lima 2020-06-11 00:47:31 -03:00
parent 4a76dc962a
commit be3938927c
No known key found for this signature in database
GPG key ID: C5EEF4C30BFBF8D7

View file

@ -10,19 +10,32 @@ sealed class Analytics(
) {
class Open : Analytics("Open game")
class NewGame(minefield: Minefield, difficulty: Difficulty, seed: Long, useAccessibilityMode: Boolean) :
Analytics("New Game", mapOf(
class NewGame(
minefield: Minefield,
difficulty: Difficulty,
seed: Long,
useAccessibilityMode: Boolean
) : Analytics(
"New Game",
mapOf(
"Seed" to seed.toString(),
"Difficulty Preset" to difficulty.text,
"Width" to minefield.width.toString(),
"Height" to minefield.height.toString(),
"Mines" to minefield.mines.toString(),
"Accessibility" to useAccessibilityMode.toString()
)
)
)
class RetryGame(minefield: Minefield, difficulty: Difficulty, seed: Long, useAccessibilityMode: Boolean, firstOpen: Int) :
Analytics("New Game", mapOf(
class RetryGame(
minefield: Minefield,
difficulty: Difficulty,
seed: Long,
useAccessibilityMode: Boolean,
firstOpen: Int
) : Analytics(
"Retry Game",
mapOf(
"Seed" to seed.toString(),
"Difficulty Preset" to difficulty.text,
"Width" to minefield.width.toString(),
@ -31,29 +44,24 @@ sealed class Analytics(
"Accessibility" to useAccessibilityMode.toString(),
"First Open" to firstOpen.toString()
)
)
)
class ResumePreviousGame : Analytics("Resume previous game")
class LongPressArea(index: Int) : Analytics("Long press area",
mapOf("Index" to index.toString())
)
class LongPressArea(index: Int) : Analytics("Long press area", mapOf("Index" to index.toString()))
class LongPressMultipleArea(index: Int) : Analytics("Long press to open multiple",
mapOf("Index" to index.toString())
)
class LongPressMultipleArea(index: Int) : Analytics("Long press to open multiple", mapOf("Index" to index.toString()))
class PressArea(index: Int) : Analytics("Press area",
mapOf("Index" to index.toString())
)
class PressArea(index: Int) : Analytics("Press area", mapOf("Index" to index.toString()))
class GameOver(time: Long, score: Score) : Analytics("Game Over",
class GameOver(time: Long, score: Score) : Analytics(
"Game Over",
mapOf(
"Time" to time.toString(),
"Right Mines" to score.rightMines.toString(),
"Total Mines" to score.totalMines.toString(),
"Total Area" to score.totalArea.toString()
)
)
)
class Victory(time: Long, score: Score, difficulty: Difficulty) : Analytics(
@ -83,17 +91,9 @@ sealed class Analytics(
class OpenSaveHistory : Analytics("Open Save History")
class ShowRatingRequest(usages: Int) : Analytics("Shown Rating Request",
mapOf(
"Usages" to usages.toString()
))
class ShowRatingRequest(usages: Int) : Analytics("Shown Rating Request", mapOf("Usages" to usages.toString()))
class TapRatingRequest(from: String) : Analytics("Rating Request",
mapOf(
"From" to from
))
class TapRatingRequest(from: String) : Analytics("Rating Request", mapOf("From" to from))
class TapGameReset(resign: Boolean) : Analytics("Game reset",
mapOf("Resign" to resign.toString())
)
class TapGameReset(resign: Boolean) : Analytics("Game reset", mapOf("Resign" to resign.toString()))
}