minesweeper-j-compose
minesweeper-j-compose copied to clipboard
🎮 A Minesweeper like puzzle game, built using Jetpack Compose, for Android.
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:
Demo
https://user-images.githubusercontent.com/37530409/178140932-2cbe1c79-9448-4c7c-af7d-2a15a84dd45b.mov
Features :
Zoomableandpannableminefield- Safe first click - The first cell is never a
mineas theminefieldis generated around the first click - Automatically
saveandresumegame progress - Multiple
difficulty levelsto choose from Settingsscreen to update and persist userpreferencesQuick togglefor click / flag modeHaptic&Auralfeedback- Day / Night theme
- Randomly generated levels
Controls :
- Tap a
cellto reveal it - Long press an
unrevealed celltoflag/un-flagit - Tap an already
revealed cellto expose potentiallysolved cells - Change default tap / long-press behaviour from the
quick toggle
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.
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.