mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 22:00:24 +07:00
Silently log ranking stats for each major civ every turn (#8964)
* Record each stat each round for each civilization. * Implement custom serialization and encapsulate logic in separate CivRankingHistory.kt * Address comments * Address comments and add RankingTypeTest.kt
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
package com.unciv.ui.screens.victoryscreen
|
||||
|
||||
import com.unciv.testing.GdxTestRunner
|
||||
import org.junit.Assert
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(GdxTestRunner::class)
|
||||
class RankingTypeTests {
|
||||
|
||||
@Test
|
||||
fun checkIdForSerializationUniqueness() {
|
||||
val uniqueIds = HashSet<String>()
|
||||
for (rankingType in RankingType.values()) {
|
||||
val id = rankingType.idForSerialization
|
||||
Assert.assertTrue(
|
||||
"Id $id for RankingType $rankingType is not unique",
|
||||
uniqueIds.add(id)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user