
Offers core logic and game engine for Minesweeper, featuring customizable board setup, multiplatform support, SQLDelight integration, and seamless Maven Central deployment through GitHub Actions.
Minesweeper Core is a Kotlin Multiplatform (KMP) library that provides the core logic for a Minesweeper game. This project serves as both a functional game engine and a robust template for creating Kotlin Multiplatform libraries. It supports a wide range of platforms, including Windows, macOS, Linux, Android, iOS, JavaScript, and JVM, making it an ideal starting point for developers looking to build cross-platform applications.
The core logic of the Minesweeper game is encapsulated in the Minesweeper interface. It provides methods to interact with the game board, such as clicking cells and checking the game state. The Builder class allows for customizable game setup, including board dimensions and mine placement.
interface Minesweeper {
fun click(x: Int, y: Int): Boolean
fun clickAsQuestioned(x: Int, y: Int): Boolean
fun clickAsFlagged(x: Int, y: Int): Boolean
fun isGameOver(): GameState
val currentBoard: Board
val save: Save
}The Builder class provides a fluent API for configuring the game:
The project is configured to support a wide range of platforms, leveraging Kotlin Multiplatform capabilities. Each platform has specific configurations for Ktor clients and SQLDelight drivers.
The project is set up with a GitHub Actions pipeline for building and deploying to Maven Central. The build.gradle.kts file includes all necessary plugins and configurations for a seamless CI/CD process.
To get started with Minesweeper Core, clone the repository and open it in your favorite IDE. You can customize the game logic or use it as a template for your own Kotlin Multiplatform projects.
git clone https://github.com/sanlean/minesweeper.gitMinesweeper Core is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
For questions or feedback, please contact Leandro Santana.
Minesweeper Core is a Kotlin Multiplatform (KMP) library that provides the core logic for a Minesweeper game. This project serves as both a functional game engine and a robust template for creating Kotlin Multiplatform libraries. It supports a wide range of platforms, including Windows, macOS, Linux, Android, iOS, JavaScript, and JVM, making it an ideal starting point for developers looking to build cross-platform applications.
The core logic of the Minesweeper game is encapsulated in the Minesweeper interface. It provides methods to interact with the game board, such as clicking cells and checking the game state. The Builder class allows for customizable game setup, including board dimensions and mine placement.
interface Minesweeper {
fun click(x: Int, y: Int): Boolean
fun clickAsQuestioned(x: Int, y: Int): Boolean
fun clickAsFlagged(x: Int, y: Int): Boolean
fun isGameOver(): GameState
val currentBoard: Board
val save: Save
}The Builder class provides a fluent API for configuring the game:
The project is configured to support a wide range of platforms, leveraging Kotlin Multiplatform capabilities. Each platform has specific configurations for Ktor clients and SQLDelight drivers.
The project is set up with a GitHub Actions pipeline for building and deploying to Maven Central. The build.gradle.kts file includes all necessary plugins and configurations for a seamless CI/CD process.
To get started with Minesweeper Core, clone the repository and open it in your favorite IDE. You can customize the game logic or use it as a template for your own Kotlin Multiplatform projects.
git clone https://github.com/sanlean/minesweeper.gitMinesweeper Core is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
For questions or feedback, please contact Leandro Santana.