Question
write a console version of the game Minesweeper in regular C preferably with comments Requirements The game shall have a basic game board comprised of
write a console version of the game Minesweeper in regular C preferably with comments
Requirements
The game shall have a basic game board comprised of a 10 by 10 grid.
The game shall hide a certain number of mines throughout the grid.
The game shall allow the user to sweep a particular square on the grid.
When the user sweeps a square that contains a mine, the game ends with the player losing.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started