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.
Before running the game, ensure you have the following installed:
- Python 3.8 or higher
pygamelibrary
- 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.
AI-Minesweeper/
├── main.py
├── game.py
├── gamestate.py
├── menu.py
├── menuitems.py
├── objects.py
├── settings.py
├── Assets/
│ ├── Tile1.png
│ └── ...
├── ...
- Clone the repository.
git clone https://github.com/meshhi13/AI-Minesweeper
- Navigate to the project directory.
- Run the game using the following command:
python main.py
- Objective: The goal is to reveal all tiles that do not contain mines. Flag all the mines to win the game.
- 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.
- 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!
