Question: Info 1521: Java Programming I Final Project Assignment Final Project, Points: 200 Overview We are going to do a clone of the Minesweeper Game. Requirements

 Info 1521: Java Programming I Final Project Assignment Final Project, Points:
200 Overview We are going to do a clone of the Minesweeper
Game. Requirements Minesweeper is a two dimensional grid that has mines hidden
randomly throughout the game space. The player guesses a cell in the
grid. If the cell has a mine in it the mine goes

Info 1521: Java Programming I Final Project Assignment Final Project, Points: 200 Overview We are going to do a clone of the Minesweeper Game. Requirements Minesweeper is a two dimensional grid that has mines hidden randomly throughout the game space. The player guesses a cell in the grid. If the cell has a mine in it the mine goes off and the game is over. If the cell does not have a mine in it the game will reveal all of the adjacent blank cells. If any of the cells have mines adjacent to them then a number is placed in that cell that indicates how many mines are adjacent. Once all the blank cells and cells with numbers have been revealed the player is given the opportunity to guess at another cell. Once all of the non-mine cells have been revealed the player wins. Our game will have ten (10) cells with mines in it. The initial filling of the grid will be done with a random generator to determine the location of the cells with mines. . The game will ask the player for a height and width to create the mincfield two dimensional grid. For this assignment we will use three classes, the main minesweeper class, a game class and a grid class. The minesweeper class will have the main method in it and will create a new game object and call the start method out of the game object. The game class will have the following methods void start(): This method will be the starting point of the game. It will need to ask the user to input the height and width of the grid, initialize the grid using the height and width, and call the game Loop void gameloopO: This method will be the main loop that runs the game. This method will ask the user to input the cell that they want to check and will call the check Location method passing the cell location that the user just inserted. int numberOfMines(introw, int col): This method will count the number of mines that are adjacent to the cell that is at the location given by the row and col values passed to it. boolean check Location int row, int col). This method will check if the location that is given by the row and col value has a mine. If it does not then it will call the clear Blanks method giving the current location. void clear Blanks(introw, int col): This method will reveal all of the cells that are adjacent to the cell at the location given by the row and col values. If one of the adjacent cells has a mine adjacent to it, then a number will be put in that cells location that corresponds to the number of mines that are adjacent. If one of the adjacent cells does not have any mines adjacent to it, then that cell will be . McCune Page 1 of 4 SAMSUNG Info 1521: Java Programming Final Project Assignment Final Project, Points: 200 Overview We are going to do a clone of the Minesweeper Game. Requirements Minesweeper is a two dimensional grid that has mines hidden randomly throughout the game space. The player guesses a cell in the grid. If the cell has a mine in it the mine goes off and the game is over. If the cell does not have a mine in it the game will reveal all of the adjacent blank cells. If any of the cells have mines adjacent to them then a number is placed in that cell that indicates how many mines are adjacent. Once all the blank cells and cells with numbers have been revealed the player is given the opportunity to guess at another cell. Once all of the non-mine cells have been revealed the player wins. Our game will have ten (10) cells with mines in it. The initial filling of the grid will be done with a random generator to determine the location of the cells with mines The game will ask the player for a height and width to create the minefield two dimensional grid. For this assignment we will use three classes, the main minesweeper class, a game class and a grid class The minesweeper class will have the main method in it and will create a new game object and call the start method out of the game object. The game class will have the following methods: void start(): This method will be the starting point of the game. It will need to ask the user to input the height and width of the grid, initialize the grid using the height and width, and call the game Loop void gameloopO: This method will be the main loop that runs the game. This method will ask the user to input the cell that they want to check and will call the check Location method passing the cell location that the user just inserted. int numberOfMines(introw, int col): This method will count the number of mines that are adjacent to the cell that is at the location given by the row and col values passed to it. boolean check Location introw, int col): This method will check if the location that is given by the row and col value has a mine. If it does not then it will call the clear Blanks method giving the current location void clearBlanks(introw, int col): This method will reveal all of the cells that are adjacent to the cell at the location given by the tow and col values. If one of the adjacent cells has a mine adjacent to it, then a number will be put in that cells location that corresponds to the number of mines that are adjacent. If one of the adjacent cells does not have any mines adjacent to it, then that cell will be . McCune Page 1 of 4 Info 1521: Java Programming Final Project Assignment turned into a blank and the cells around it will be revealed and checked for mines. This process will continue until the only cells left all have numbers indicating the number of mines. The gnd class will have a constructor that takes two parameters, a height and a wilth. It will also have the following methods randomFillGrid(): This method will randomly place mines in the grid. displayGrid(): This method will display the grid with the hidden and revealed cells. displayGridData(): This method will display the grid with the locations of the mines revealed. The previous list of methods is a minimum requirement. You can have more methods than these. However, these methods must appear and be used in your project. There are some sample screenshots in a following section Screen Shots These screen shots are examples of what your application should look like. run: Enter the height of the grid: 10 Enter the width of the grid: 10 There are a total of 10 mines in the mine field. 1 2 3 4 5 6 7 8 9 10 1 2 3 ...... 4 6 7. 8 ... 9 ...... 10 ....... Pick a spot to check for a mine. First enter the tow number then the column number: 10 10 There are a total of 10 mines in the mine field. 12345678910 1 2 *42222222 McCune Page 2 of 4 Info 1521: Java Programming I Final Project Assignment 3 221 4 3 6 7 8 9 10 Pick a spot to check for a mine. First enter the row number then the column number: 1 5 There are a total of 10 mines in the mine field. 1 2 3 4 5 6 7 8 9 10 2..... 2. 42222222 3 221 4 5 6 7 8 9 10 Pick a spot to check for a mine. First enter the row number then the column number: 1 8 There are a total of 10 mines in the mine field. 1 2 3 4 5 6 7 8 9 10 1...2..2.. 2.42222222 3221 4 5 6 7 8 9 10 You Win! BUILD SUCCESSFUL (total time: 2 minutes 52 seconds) Final Project Assignment Info 1521A Java Programming I Enter the height of the grid: 10 Enter the width of the grid: 10 There are a total of 10 mines in the mine field. 1 2 3 4 5 6 7 8 9 10 .. 2 . . . . . . . 9 10 Pick a spot to check for a mine. First enter the row number then the column number: GameOver! There are a total of 10 mines in the mine field. 1 2 3 4 5 6 7 8 9 10 1 2 3 . 4 5 6 7 8 9 10 BOTED SUCCESSFUL (total time: 4 seconds) Hand in For this assignment please hand in the full project folder with all the files in a single zipped folder

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!