https://github.com/bog-walk/minesweeper
:sunglasses: Retro Minesweeper built with Compose for Desktop.
https://github.com/bog-walk/minesweeper
compose-for-desktop jetpack-compose kotlin minesweeper
Last synced: about 1 month ago
JSON representation
:sunglasses: Retro Minesweeper built with Compose for Desktop.
- Host: GitHub
- URL: https://github.com/bog-walk/minesweeper
- Owner: bog-walk
- License: mit
- Created: 2021-05-04T01:17:50.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-05T17:49:54.000Z (5 months ago)
- Last Synced: 2025-03-22T16:03:03.519Z (about 1 month ago)
- Topics: compose-for-desktop, jetpack-compose, kotlin, minesweeper
- Language: Kotlin
- Homepage:
- Size: 1.34 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# :rocket: Minesweeper :sunglasses::boom:

:video_game: A dark-mode Minesweeper desktop app built using **JetBrains**
[Compose for Desktop](https://www.jetbrains.com/lp/compose-desktop/).## :memo: Game details
The game follows the classic rules with 3 built-in levels, as well as a custom level that allows the user to choose
the size of the game grid and the amount of mines.
## :briefcase: Features
- Recursive expansion of selected cells with no surrounding mines
- Left- vs right-click mouse handling
- Use of `Canvas` to draw composables (including 7-segment digital screens) with a retro feel
- Window menu items trigger pop-up dialogs for: viewing rules, customizing game options
- Pop-up dialog triggered when in-game time exceeded, handled by state holder and `Timer()`
- Text fields validate input while typing and trigger composition of appropriate error messages regardless of focus order
- Robust model and UI test suites## :computer: Run desktop application
Clone the repository then pick an option:
- Open the project in IntelliJ IDEA and run `desktop/src/jvmMain/Main.kt` using gutter icon
## :microscope: Run tests
Clone the repository then pick an option:
- Open the project in IntelliJ IDEA then choose specific tests using gutter icons or right-click the `desktop/src/jvmTest` folder and
select `Run 'Tests in 'minesweeper.desktop.jvmTest''`- `./gradlew desktop:jvmTest` from an open terminal in the root of the project
- Open the Gradle toolbar and select `minesweeper/Tasks/verification/jvmTest`