Question: Code in matlab please Activities Today, you are going to create an interactive Minesweeper game where the object is to clear the field of (randomly

Code in matlab please
Code in matlab please Activities Today, you are going to create an
interactive Minesweeper game where the object is to clear the field of

Activities Today, you are going to create an interactive Minesweeper game where the object is to clear the field of (randomly placed) mines. The "rules" are: This is a solitaire game (one player); clicking on a square containing a mine reveals (l.e., "explodes") the mine; clicking on an "empty" square clears the square and provides a clue (reveals the number of mines adjacent to the square); There are several alternatives as to the endgame; revealing all of the mines; revealing all of the empty squares; clearing a path through the field; etc. You may implement any so long as you are able to determine the end of the game. Implementation The code will need to do many things in cluding the following, using a variety of functions. 1. Create a figure with the various controls arranged in an appropriate fashion paying attention to function AND aesthetic; 2. In the setup, create a field of buttons (uicontrol's must be used); the size of the field is provided by the user; 3. A user specified number of mines are to be randomly placed and hidden within the field; 4. A button will close the window (ending the game); 5. An button will provide the author's name in addition to a summary of how to play (use) the game (including the goal); 6. Provide some means for the user to get a "hint" as to a safe place to start/play; 7. Provide some means to "flag" (i.e., disable) a mine; 8. When a square is "cleared", the number of neighboring mines is displayed in the square; 9. Indicate the probability of a mine being present in the neighborhood of a square; That is show the ratio of uncleared mines to uncleared squares in the neighborhood; 10. The user's progress toward the goal will be displayed; 11. To assist with grading provide the means (i.e., a button) to reveal all of the mines during play so that the instructor can easily determine the correctness of the calculations. This should be done in such a way as to not disturb the clues. This will also help you to test your code

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!