This is the classic Minesweeper game developed in C++ with a graphical interface using SDL2. The gameplay follows the traditional rules, offering a familiar and entertaining experience.
Minesweeper is a logic-based game where the objective is to clear a minefield without detonating any mines. This project replicates the classic game experience with a user-friendly and graphical interface.
To run this project, you will need to install and configure SDL2 and a C++ compiler. Here are the basic steps:
-
Install SDL2:
- Download SDL2 from the official website.
- You will also need to download SDL_ttf.
- Follow the installation instructions for your operating system.
-
Install MinGW:
- Download MinGW from the official website.
- Make sure you read the documentation on how to use this compiler.
-
Configure the Project:
- Ensure the SDL2 headers and libraries are correctly set up in your development environment, such as the /include folders and the /lib/x64 folders. You must also include the main SDL folder to your environment variables.
- Compile the project, making sure to link the SDL2 libraries.
- using MinGW, you might run a command like:
g++ -o my_project main.cpp -IC:/path/to/SDL2/include -LC:/path/to/SDL2/lib -lSDL2 -lSDL2_ttf
- Add to your project folder the arial.ttf font.
- Left Click: Reveal a cell.
- Right Click: Place or remove a flag.
Difficulty: Difficulty options enabled based on number of mines.
Rendering: Smooth rendering of game objects using SDL2.
This project is licensed under the MIT License - see the LICENSE file for details.