A classic single-player puzzle game where the objective is to clear a grid-based minefield without detonating any hidden mines. Whether you're a beginner or a seasoned player, this version offers an engaging experience with a fresh take on the traditional Minesweeper formula.
Gameplay
The game is played on a rectangular grid of square cells , dynamically sized to fit the player's screen while maintaining a minimum of 5x5 cells. Some cells contain hidden mines, and the player's goal is to reveal all non-mine cells to win. Key gameplay mechanics include:
Revealing Cells: Tap a cell to uncover it. If it contains a mine, the game ends with a "Game Over" message. If it’s safe, it reveals either a number (indicating how many mines are in adjacent cells) or a blank cell, which automatically opens neighboring cells if no mines are nearby.
Flagging Mines: Long-press a cell to place or remove a flag, marking it as a suspected mine. Flags help track potential mines and prevent accidental taps.
Winning the Game: Clear all non-mine cells to trigger a "You Win!" message. The game tracks your time and displays it alongside the number of mines left.
Losing the Game: If a mine is revealed, all mines are shown (marked with ), and the game ends with a "Game Over" message. Tap the message to restart.
Features
This implementation includes several modern enhancements to make the game more engaging and user-friendly:
Dynamic Grid Sizing: The grid adjusts to the screen size, ensuring optimal use of space while keeping cells square.
Customizable Difficulty: Choose from three difficulty levels via a dropdown menu:Easy: 10–15% of cells are mines. Medium: 15–20% of cells are mines (default). Hard: 20–25% of cells are mines. Changing difficulty restarts the game with a new mine count and resets the timer.
Emoji-Based Visuals: Mines are represented by , and flags use , making the game visually intuitive. Numbers indicating nearby mines are color-coded (e.g., blue for 1, green for 2, red for 3) for quick recognition.
Timer and Mine Counter: A real-time timer tracks playtime in seconds, pausing when the game ends and resetting on restart. The mine counter shows remaining mines (total mines minus flagged cells), updating dynamically and allowing negative values if too many flags are placed.
User Guidance: A centered text, "Long press to place a flag ," located below the top bar, informs players how to flag mines, ensuring accessibility for new players.
Restart Options: Restart the game in multiple ways:Press the "Restart" button, located to the right of the flag instruction text. Tap the "Game Over" or "You Win!" text displayed on the game field after the game ends. Change the difficulty level, which automatically restarts the game.
Exit Button: An "Exit" button in the top bar allows players to close the app easily.
Centered Game Field: The grid is centered on the screen, with reduced padding to minimize empty space around the "Game Over"/"You Win!" text.
How to Play
Start the Game: Launch the app to see a fresh minefield. The default difficulty is Medium.
Reveal Cells: Tap a cell to uncover it. Numbers indicate nearby mines; blank cells open adjacent cells automatically.
Flag Mines: Long-press a cell to place or remove a flag (). Watch the smooth animation as flags appear or disappear.
Monitor Progress: Check the "Mines left" counter and timer to track your progress.
Adjust Difficulty: Use the dropdown (Easy, Medium, Hard) to change the mine density. This restarts the game.
Restart: Press the "Restart" button (next to the flag instruction) or tap "Game Over"/"You Win!" to start a new game. The timer resets automatically.
Exit: Use the "Exit" button in the top bar to close the app.