This program implements a basic version of the Minesweeper game. It includes functions for creating a new game, displaying the game board, and handling user commands like uncovering Cells and flagging mines.
- Customizable grid size and mine count.
- Command-line based user interface.
- Commands to uncover cells, flag potential mines, and start new game.
- A C compiler (like GCC)
- Make (optional for build automation)
- Clone the repository:
git clone https://github.com/nverkhachoyan/Minesweeper.git
- Navigate to the cloned directory:
cd Minesweeper
- Compile the project. If you have
make
installed:Alternatively, you can compile manually:make
gcc -o Minesweeper src/*.c -I include
After compiling, run the game using:
./Minesweeper
- Start a new game by typing
new [rows] [columns] [mines]
. - Uncover a cell with
uncover [row] [column]
. - Flag a cell with
flag [row] [column]
. - Unflag a cell with
unflag [row] [column]
. - Display the current state of the board with
show
. - Exit the game with
quit
.
Contributions to the Minesweeper project are welcome. Please feel free to fork the repository, make your changes, and create a pull request.
- This was a project assignment for COMP 222 at California State University.