Skip to content

๐ŸŽฎ A Minesweeper like puzzle game, built using Jetpack Compose, for Android.

License

Notifications You must be signed in to change notification settings

jayasuryat/minesweeper-j-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

MJC-Demo-1.0.0.mov

Features :

  • Zoomable and pannable minefield
  • Safe first click - The first cell is never a mine as the minefield is generated around the first click
  • Automatically save and resume game progress
  • Multiple difficulty levels to choose from
  • Settings screen to update and persist user preferences
  • Quick toggle for click / flag mode
  • Haptic & Aural feedback
  • Day / Night theme
  • Randomly generated levels

Controls :

  • Tap a cell to reveal it
  • Long press an unrevealed cell to flag / un-flag it
  • Tap an already revealed cell to expose potentially solved 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.