All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.elderscrollslegends.Collection.kt Maven / Gradle / Ivy

There is a newer version: 1.1.7
Show newest version
package io.elderscrollslegends

class Collection(
    cards: List = emptyList()
): CardGrouping(cards) {

    fun exportCode(idMapper: (cardId: String) -> String = { Decoder.idToCodeMap.getOrDefault(it, "__") }): String {
        return Decoder(DecoderType.COLLECTION, idMapper).createExportCode(this)
    }

    companion object {
        @JvmStatic
        fun importCode(code: String) = Collection(Decoder(DecoderType.COLLECTION).createListFromCode(code))
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy