The Game Board Create a representation of the minesweeper as a char 2D Array. In
ID: 3532603 • Letter: T
Question
The Game Board
Create a representation of the minesweeper as a char 2D Array. Initialize it to some initial
state. To make it easier, first create a 5x5 board, and place 5 bombs wherever you would
like, then update the numbers that indicate neighboring bombs. Create a second
representation of the board that represents the revealed state of each cell (e.g. it has a 1-1
mapping to the first board that indicates whether a cell is in a revealed state) Write the
following methods, keeping in mind you will have to determine the appropriate
inputs/outputs (e.g. arguments/return types).
printBoard(): prints a Minesweeper board to screen in text form. Keep in mind, that the
printed board should reflect which cells have already been revealed.
revealCell(): appropriately modifies the state array when a cell is to be revealed
You should test both of these methods before moving on.
Now, write a main game loop that makes use of the two methods you just wrote. Your
game loop should interact with the user asking her for any inputs you had identified in
Milestone 1, and trivially, should be able to identify when the user has lost (e.g. hit a
mine). At this point, no cascading reveals are necessary