This is a simplified version of the mine sweep game. You will randomly populate
ID: 3535003 • Letter: T
Question
This is a simplified version of the mine sweep game. You will randomly populate a grid with bombs. The user will then be allowed to guess the locations of empty spots until they run into a bomb. Once they have blown up, you will show the grid and report how many spaces were guessed before they encountered the bomb. The object of the game is to guess as many free spaces without hitting a bomb.
Specifics:
Functions
The following functions are required
BOOM, HARMLESS, and TAKEN should be defined as constants in global scope and have the following values:
The game flows as follows:
it is ok to use a do-while loop since we are forcing people to play it at least once.
What you can not do
Explanation / Answer
void main() { int b; do { cout = 10); int board[b][b]; //0 - 8 = # of mines, 9 is mine int revealed[b][b]; //1 is revealed int i = 0; int j = 0; int x = 0; int y = 0; int z; //number of mines int q; int t = 0; //game over input int dead = 0; do { coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.