Question: Create a minesweeper game using C. Program needs: The game should have a basic game board comprised of a 10 by 10 grid. The game
Create a minesweeper game using C.
Program needs:
The game should have a basic game board comprised of a 10 by 10 grid.
The game shall hide a certain number of mines throughout the game board.
The game should allow the player to sweep a particular square on the grid.
When the user sweeps a square that contains a mine, the game ends and the player loses. When the user sweeps a square that does not contain a mine, the square shall then display the number of mines in its neighboring squares.
When a swept square does not have any neighboring squares containing mines, it shall display 0 and also uncover its neighboring squares. Doing so leads to a chain reaction, which can uncover a number of squares on a single turn.
The game shall end with the player winning upon having all squares that do not contain mines swept.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
