Skip to content

meshhi13/AI-Minesweeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minesweeper AI

This is a Python implementation of the classic Minesweeper game with an AI assistant to help you play. The game is built using the pygame library.

Screen Recording 2025-07-14 at 4 52 55 PM

Requirements

Before running the game, ensure you have the following installed:

  • Python 3.8 or higher
  • pygame library

Features

  • AI Assistance: The AI can analyze the board and make moves or flag tiles based on clues.
  • Dynamic Board: The board size and number of mines can be customized.
  • Visual Feedback: The game provides visual cues for flagged tiles, revealed tiles, and game status.

Project Structure

AI-Minesweeper/
├── main.py
├── game.py
├── gamestate.py
├── menu.py
├── menuitems.py
├── objects.py
├── settings.py
├── Assets/
│   ├── Tile1.png
│   └── ...
├── ...

How to Run

  1. Clone the repository.
git clone https://github.com/meshhi13/AI-Minesweeper
  1. Navigate to the project directory.
  2. Run the game using the following command:
python main.py

How to Play

  1. Objective: The goal is to reveal all tiles that do not contain mines. Flag all the mines to win the game.
  2. Controls:
    • Left Click: Reveal a tile.
    • Right Click: Flag or unflag a tile.
    • AI Move Button: Click the "AI MOVE" button to let the AI assist you in making a move.
    • Restart: If the game ends, click the "RESTART" button to start a new game.
  3. Game Over:
    • If you reveal a mine, you lose.
    • If all non-mine tiles are revealed and all mines are flagged, you win.

Enjoy playing Minesweeper with AI assistance!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages