Fix issue where solution is in perfect order

This commit is contained in:
Christian Basler
2025-06-16 18:02:02 +02:00
parent dedc686e9e
commit 85763485d3
9 changed files with 117 additions and 11 deletions

View File

@@ -138,6 +138,7 @@ enum class Transportation(symbol: String) : ItemClass<Transportation> {
companion object : ItemClassCompanion<Transportation> {
override val items: List<Transportation> = entries
}
}
private val GENDERS = arrayOf("\uD83E\uDDD1", "\uD83D\uDC68", "\uD83D\uDC69")
@@ -150,13 +151,17 @@ private fun idic(symbol: String): Array<String> = Array(GENDERS.size * SKIN_TONE
g + t + symbol
}
sealed interface ItemClass<out SELF : ItemClass<SELF>> {
sealed interface ItemClass<out SELF : ItemClass<SELF>>: Comparable<ItemClass<*>> {
val symbols: Array<String>
val name: String
val companion: ItemClassCompanion<SELF>
val ordinal: Int
override fun compareTo(other: ItemClass<*>): Int = ordinal.compareTo(other.ordinal)
companion object {
val classes: List<ItemClassCompanion<*>> = listOf(
Nationality,