KMPCardGames project icon

Solitaire & FreeCell (KMP)

Built for Batteries Included, LLC: one Kotlin codebase ships the same game to Android, iOS, web, and desktop JVM—shared rules and tests in one module, with a lightweight KorGE client on top.

At Batteries Included, LLC I built this Kotlin Multiplatform card-game stack so Solitaire and FreeCell rules live in a shared module with common tests, while a small real-time KorGE shell runs those rules on each platform: Android, desktop JVM, web, and iOS. The focus is consistent domain code, per-platform input and rendering, and multi-target Gradle packaging— a foundation the company can ship and extend, not a throwaway demo.

Company

Batteries Included, LLC

Role

Lead developer

Kotlin in the shared layer

~96% of app code; ~600 lines platform-only

Automated tests on shared rules

33 test files · 174 @Test cases

Figures measured 2026-08-22. Tests live in the shared module’s commonTest source set (Gradle/KMP)—same tests back JVM, Android, and other linked targets. Breakdown and counting notes are in the repo README.

CI status

CI status badge

What lives in shared code

  • Models for cards, piles, overall game state, and which variant rules apply
  • Player actions, validation, and accepted or rejected move results
  • Solitaire and FreeCell rule sets plus shared rule plumbing
  • Session management, deterministic state updates, undo and redo, and game factories
  • Read models so UIs can render without reaching into rule internals

Why Kotlin Multiplatform fits this project

  • One implementation of the rules, shipped to web, desktop JVM, Android, and iOS from the same project
  • Tests in common source exercise the same paths every client links against
  • A clear boundary: KorGE stays in the client module; the domain stays plain Kotlin
  • A small real-time client doubles as a stress test for shared state and multi-target builds
2026Kotlin MultiplatformKotlinKorGEGradle

Solitaire Interactive Demo