Question: please use C++ and show your code below. Turn in: A copy of the program and sample, annotated output showing the program runs. You do

please use C++ and show your code below. Turn in: A copyplease use C++ and show your code below.

Turn in: A copy of the program and sample, annotated output showing the program runs. You do not need to print an entire game, but you should show (and label) the important cases, which include the player winning, the player losing, the player entering an illegal move, and how the map changes when the player enters a legal move For this assignment you will be writing a gopher hunt game. In gopher hunt the player has to pick cells on a two dimensional grid - avoiding the locations of the gophers. Each time a cell is selected the number of gophers in the neighboring spaces is revealed in that cell (neighbors includes diagonals so each cell has eight neighbors). The player loses if they pick a cell containing a gopher. (Yes, this game is very similar to minesweeper On each turn the entire map should be printed, showing which cells have been explored, which cells haven't been explored, and for the explored cells how many neighboring cells contain gophers. It should look something like +++101 +++20 (but bigger), where a is an unexplored cell and the numbers are explored cells showing the number of neighboring gophers After the map is displayed the player picks a cell by entering the cell's x.y coordinates. The program should make sure that these values are in bounds and print an error message and request new coordinates if the cell is out of bounds If there is a gopher in the selected cell the player should lose. Otherwise the number of gophers in neighboring cells should be added to the map and the process repeats. The player wins if every cell without a gopher in it has been revealed For this game you will probably want two 2-dimensional arrays. One array keeps track of where the gophers are and the number of neighboring gophers for each square. The other array keeps track of which cells the player has already guessed You may change the theme of the game. If you want the player to be avoiding the sleeping vampires, that's fine Turn in: A copy of the program and sample, annotated output showing the program runs. You do not need to print an entire game, but you should show (and label) the important cases, which include the player winning, the player losing, the player entering an illegal move, and how the map changes when the player enters a legal move Turn in: A copy of the program and sample, annotated output showing the program runs. You do not need to print an entire game, but you should show (and label) the important cases, which include the player winning, the player losing, the player entering an illegal move, and how the map changes when the player enters a legal move For this assignment you will be writing a gopher hunt game. In gopher hunt the player has to pick cells on a two dimensional grid - avoiding the locations of the gophers. Each time a cell is selected the number of gophers in the neighboring spaces is revealed in that cell (neighbors includes diagonals so each cell has eight neighbors). The player loses if they pick a cell containing a gopher. (Yes, this game is very similar to minesweeper On each turn the entire map should be printed, showing which cells have been explored, which cells haven't been explored, and for the explored cells how many neighboring cells contain gophers. It should look something like +++101 +++20 (but bigger), where a is an unexplored cell and the numbers are explored cells showing the number of neighboring gophers After the map is displayed the player picks a cell by entering the cell's x.y coordinates. The program should make sure that these values are in bounds and print an error message and request new coordinates if the cell is out of bounds If there is a gopher in the selected cell the player should lose. Otherwise the number of gophers in neighboring cells should be added to the map and the process repeats. The player wins if every cell without a gopher in it has been revealed For this game you will probably want two 2-dimensional arrays. One array keeps track of where the gophers are and the number of neighboring gophers for each square. The other array keeps track of which cells the player has already guessed You may change the theme of the game. If you want the player to be avoiding the sleeping vampires, that's fine Turn in: A copy of the program and sample, annotated output showing the program runs. You do not need to print an entire game, but you should show (and label) the important cases, which include the player winning, the player losing, the player entering an illegal move, and how the map changes when the player enters a legal move

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!