Skip to content

OmerFarukAY/minesweeper-game

Repository files navigation

💣 Minesweeper Game

Flutter Dart

📌 About the Project

This repository contains a modern, mobile-friendly clone of the classic Minesweeper puzzle game, built entirely with Flutter. It challenges players to clear a rectangular grid containing hidden "mines" without detonating any of them, using mathematical clues provided by the safe cells.

Building this game in Flutter is an excellent demonstration of handling complex grid states, efficient UI rendering, and reactive state management in a mobile environment.

✨ Key Features

  • Dynamic Grid: A fully responsive grid that adapts to different screen sizes.
  • Reactive Gameplay: Instant state updates when revealing cells or placing flags.
  • Recursive Revealing (Flood Fill): Automatically clears adjacent empty cells when a completely safe cell is tapped, providing a smooth gameplay experience.
  • Win/Loss Logic: Accurately tracks the game state, triggering game over or victory dialogs.
  • Flagging System: Long-press (or toggle) mechanic to mark suspected mine locations.

🎮 Gameplay Preview

image image image

🛠️ Technologies & Architecture

  • Framework: Flutter
  • Language: Dart
  • Core Concepts: GridView.builder for efficient layout mapping, recursive algorithms for the flood-fill effect, and robust state management.

🚀 Getting Started

If you want to run this game on your local machine:

  1. Clone the repository:
    git clone [https://github.com/OmerFarukAY/flutter-minesweeper.git](https://github.com/OmerFarukAY/flutter-minesweeper.git)
    cd flutter-minesweeper
  2. Install dependencies:
    flutter pub get
  3. Run the app:
    flutter run

(Make sure you have an emulator running or a physical device connected).


🕹️ How to Play Tap a cell to reveal it. If it's a mine, the game is over!

If the cell is safe, it displays a number indicating how many mines are hiding in the adjacent 8 squares.

Use logic to deduce where the mines are. Long-press to place a flag on suspected mines.

You win when all non-mine cells are successfully revealed.


Author: Ömer Faruk AY

About

A modern, mobile-friendly clone of the classic Minesweeper puzzle game built with Flutter. Demonstrates reactive state management, GridView UI rendering, and recursive algorithms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages