Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

you will start building the software infrastructure that will allow you 1 of 5 t

ID: 3818342 • Letter: Y

Question

you will start building the software infrastructure that will allow you 1 of 5 tc ersion of the class game of Minesweeper that will display to the 6, you will continue the work begun here to finish the development SC of the game Your program's output should initially call a function to display the department and course number, your name, your EUID, and your e-mail address. function, your program will prompt the user to enter the number of mines In the ma as an integer between 5 and 10, inclusively, that will be placed in a randomly selected location on the 5-by-5 board used for the game. the user does not enter a valid response, you will repeat this process until a valid response is entered To start the game, you will display an introductory message, giving details about the game, including the size of the board, the number of number of mines placed on the board, and the objective of the game (i.e., how many squares are needed to be selected without hitting a mine to win). This will be implemented as a function, passing in parameters as needed. You shall declare a two-dimensional array in main O to represent the 5-by-5 board as type you declare to represent the various values that a square can assume. enum Each square on your board may contain one of the following values (according to the rules of the game) initial value of square not revealed (may or may not contain mine) a mine is present at this location the user selected a square containing a mine the number of mines contained in the immediately adjacent squares The size of the square board should be declared as a constant, but it is up to you whether or not it is a local or global constant You will initialize the board using a function, passing in the two-dimensional array and the size. This function will simply initialize each position on the board to the enumerated type representing the initial value, which is the character You will then assign the number of mines between 5 and 10, inclusively, specified by the user to randomly generated locations on the board using a bool function, passing in the two-dimensional array and the size. This function will generate a random row- column position and then attempt to place a mine at that row-column position on the board. Since the row-column position is randomly generated, if the function attempts to place a mine on a square that already contains a mine, the method will return false indicating that the assignment was not successful. If the square, however, does not already contain a mine, then the function will assign a mine to that location by assigning that row-column position with the enumerated type representing the mine and return true, indicative that the assignment was successful. Note that this function attempts to

Explanation / Answer

consider the referance of below code