jayasuryat / minesweeper-j-compose

🎮 A Minesweeper like puzzle game, built using Jetpack Compose, for Android.
Apache License 2.0
87 stars 15 forks source link
android compose game jetpack-compose kotlin minesweeper minesweeper-game puzzle

Minesweeper w/ Jetpack Compose

This is a Minesweeper-like puzzle game, built using Jetpack Compose, for Android.

The objective of this game is to clear a rectangular board containing hidden "mines" or bombs without detonating any of them, with help from clues about the number of neighboring mines in each cell.

⬇️ Try out the app, download the apk from the link below:

Minesweeper-JC

Demo

https://user-images.githubusercontent.com/37530409/178140932-2cbe1c79-9448-4c7c-af7d-2a15a84dd45b.mov

Features :

Controls :

Package Structure :

com.jayasuryat.minesweeperjc
├── 📂 app/                          # App module
│   ├── data/                         # Data source mappings
│   ├── di/                           # DI wiring
│   ├── presentation/                 # Navigation & Screens
│   ├── theme/                        # Theming
│   └── MinesweeperApp.kt
│
├── 📂 buildScripts/                 # Build scripts and pre-commit hooks
│
├── 📂 buildSrc/                     # Dependency versions LUT
│
├── 📂 minesweeper-engine/           # Module for driving all the logics of the game
│   ├── controller/                   # Game actions, events, game controller and action handlers
│   │   └── model/                    # Models for actions and events
│   ├── gridgenerator/                # Generators for the minefield
│   └── model/                        # Models for cells and grid
│
├── 📂 minesweeper-engine-debug/     # Module for debug utils related to minesweeper-engine
│
├── 📂 minesweeper-ui/               # Module for all of the UI components of the mine grid
│   ├── action/                       # Action listeners for Minefield interaction actions
│   ├── cell/                         # All composables related to MineCells
│   ├── component/                    # Helper composables
│   ├── config/                       # UI configuration for mine grid
│   ├── grid/                         # All composables related to MineGrid
│   ├── model/                        # UI models for all the MineCells and layout information
│   └── theme/                        # Theming for Minefield UI components
│
├── 📂 data/                         # A Kotlin Multiplatform Mobile module for all of the data operations
│   ├── androidMain/                  # Android implementations
│   │   ├── di/                       # Wiring of Android specific implementations
│   │   └── sqldelight/               # Android Sqlite driver setup
│   ├── iosMain/                      # iOS implementations
│   │   ├── di/                       # Wiring of iOS specific implementations
│   │   └── sqldelight/               # Native Sqlite driver setup
│   ├── commonMain/                   # Common infrastructure
│   │   ├── sqldelight/               # Sqlite query definitions
│   │   └── kotlin/                   
│   │       ├── di/                   # DI wiring for all of the data layer
│   │       ├── model/                # Data models for the data layer
│   │       ├── source/               # Data sources
│   │       └── sqldelight/           # DB setup
│
├── 📂 ui-game/                      # Module for the actual MineField screen
│   ├── composable/                   # All UI components
│   │   ├── feedback/                 # Composables for handling feedback
│   │   ├── toggle/                   # Composables for in game quick-toggle
│   │   └── topbar/                   # Composables for game TopBar
│   ├── data/                         # Data layer skeletons for game state persistence
│   ├── feedback/                     # Helper classes for performing feedback operations
│   ├── logic/                        # Game logic coordinators
│   └── GameScreen.kt                 # Actual Game-Screen
│
├── 📂 ui-difficulty-selection/      # Module for difficulty selection screen
│
└── 📂 util/                         # Module for common utilities

Contributions

Contributions are welcome! See Contributing Guidelines.

Credits

All the SFX used in this project are sourced from freesound.org and are licensed under the Creative Commons 0 License. * [Cell flagging sound](https://freesound.org/people/plasterbrain/sounds/237422/) by [plasterbrain](https://freesound.org/people/plasterbrain/) * [Cell unflagging sound](https://freesound.org/people/plasterbrain/sounds/423168/) by [plasterbrain](https://freesound.org/people/plasterbrain/) * [Game completed sound](https://freesound.org/people/Leszek_Szary/sounds/171584/) by [Leszek_Szary](https://freesound.org/people/Leszek_Szary/) * [Game over sound](https://freesound.org/people/Leszek_Szary/sounds/171526/) by [Leszek_Szary](https://freesound.org/people/Leszek_Szary/) * [Cell poping sound](https://freesound.org/people/onikage22/sounds/240566/) by [onikage22](https://freesound.org/people/onikage22/)

License

 Copyright 2022 Jaya Surya Thotapalli

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.