Minesweeper-TUI is a command-line implementation of the Minesweeper game in C.
- Make sure you have the necessary requirements installed on your system.
- Clone the repository or download the source code files.
- Open a terminal and navigate to the directory containing the source code files.
- Compile the program by running the command
make
. - Run the program using the command
make run
.
- The game board is represented by a grid of cells.
- Each cell may either be empty or contain a mine.
- The goal of the game is to uncover all the empty cells.
- Uncover a mine to lose the game.
🖱️ Left | uncover an undiscovered cell ( ■ ) |
---|---|
uncover the surroundings of a numbered cell ( 2 ) if all its adjacent mines are flagged | |
🖱️ Right | flag ( ⚑ ) an undiscovered cell as a mine spot |
🖱️ Middle | mark ( ? ) an undiscovered cell as a possible mine spot |
Q | quit the game or exit the program |
N | start a new game |
R | restart the current game |
make
: Compiles the source code files and generates the executable file.make run
: Runs the program.make clean
: Deletes the executable file.make test
: Compiles the program in testing mode.
- This program has been tested on Windows Subsystem for Linux (WSL) with GCC installed. Compatibility with other systems may vary.
- To ensure proper rendering of the game board, it's recommended to use a monospace font that supports the Unicode symbols used by the game.
Feel free to modify the code and customize the game according to your preferences.
© 2023-2024 Ivano Izzo
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.