Skip to content

Repository files navigation

TCG Mapper

CI License Last Release

Discord

badge badge badge badge badge badge badge badge

Provide helpers to easily map Trading Card Game into Kotlin Multiplatform libraries / applications

Installation

implementation("eu.codlab:tcg-mapper:$version")

This will work on the following platforms :

  • Mobile (Android/iOS)
  • Web (js)
  • Native (MacOS/Linux/Windows)
  • JVM (MacOS/Linux/Windows)

Usage

Configure the GithubConfiguration to access the raw files remotely

  GithubConfiguration.let {
    it.githubGroup = "your-group"
    it.githubRepo = "your-repo"
  }

Loader & AbstractLoader

Gives access to decoding from either remotely or locally

val loader: Loader<SWU> = Loader(
    myMokoLocalFile,
    "myMokoLocalFile",
    SWU.serializer(),
    GithubConfiguration(
        "great-illuminary",
        "some-repo"
    )
)

// ...

suspend fun load(): SWU {
    val loaded: SWU = loader.loadFromGithub("my-feature-branch")
    println("loaded $loaded")
    
    return loaded
}

Http & Serializer provider

  • Provider.yaml
  • Provider.json

TranslationHolder

Simple class definition to hold multilanguage T object

About

Map easily TCG formats to Multiplatform environments

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages