CompCardero is a simple card game and sample for Kotlin Multiplatform and Compose. It's developed for Android, iOS and desktop.
See the documentation of Kotlin Multiplatform for the required steps.
The project consists of the following modules:
composeApp
commonMain
: Common logic for Android, iOS and desktop.androidMain
: Specific code to build the Android appdesktopMain
: The desktop applicationiOSMain
: Code specific to the iOS app
iosApp
: A Xcode project for the iOS app
- Kotlin Multiplatform: Just a great multiplatform framework
- Compose Multiplatform: Create beautiful declarative UIs
- Voyager: Easy to use navigation library
- KOIN: Simple and clean dependency injection framework
- MOKO resources: Great for handling resources
- Multiplatform Settings: So good to persist key-value data for all platforms
...and many more
The game itself is a simple deck/trading card game.
- You start with a deck of cards, some hand cards, current/max energy (blue) and health (green)
- Playing a card costs energy (blue circle). A card can attack (red) the enemy and heal (green) yourself
- Every round your current energy and max energy increases
- Every round you can play cards until no energy is left
- The human player and the bot play in turns until one has zero health You can configure the game settings like hand size, energy and health when starting a new game
The cards are generated with Stable Diffusion 1.5
Feel free to contribute via pull requests.
The project is licensed by the Apache 2 license.