This is an implementation of the Minesweeper game in Kotlin and Compose Multiplatform.
Tech stack:
- Kotlin
- Compose Multiplatform - declarative UI
- Decompose - navigation and lifecycle
- MVIKotlin - state management
- kotlinx-serialization - state saving and restoration
Supported targets: Desktop (JVM) and Wasm Browser.
Running desktop app: ./gradlew :composeApp:run
Wasm browser app: https://arkivanov.github.io/Minesweeper
Controls:
- Left mouse button - dig a cell
- Right mouse button - flag a cell
- Middle mouse button (or both left and right buttons simultaneously) - dig all unflagged adjacent cells
Known issues:
- The browser app recognizes all mouse buttons as left.
- The cursor is not working in settings text fields in the browser app.
- Cells may be misclicked in the browser app on mobile devices.
Screenshots: