Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This minesweeper application should be a Console App(.NET Core) in C#, based off of the requirements above, The 2nd picture is what the console/game should

image text in transcribedimage text in transcribedimage text in transcribed

This minesweeper application should be a Console App(.NET Core) in C#, based off of the requirements above, The 2nd picture is what the console/game should look like when the minesweeper game is running.

Milestone 1: Console Application Overview In this milestone, students will create three classes: Cell, Board, and Program. mware-hostShared Folders\Documents Visual Studio 2017 projects Mir Execution Execute this assignment according to the following guidelines: 2. Create a class that models a game Cell. A game cell should have the following properties: a. Its row and column. These should initially be set to - 1 b. Its visited Boolean value. This should initially be set to false. c. Live Boolean value. This should initially be set to false, "Live" set to true will indicate that the cell is a "live bomb" cell. d. The number of neighbors that are "live." This should initially be set to 0. The Cell class should have a constructor as well as getters and setters for all properties. 3. Create a class that models a game Board. A game board should have the following properties: a. Size. The board will be square, where the size includes the dimensions of both the length and width of the board. b. Grid. The grid will be a 2-dimensional array of the type cell. c. Difficulty. A percentage of cells that will be set to "live" status. 4. The Board class should have the following methods: a. The constructor for the Board should have a single parameter to set the size of the Grid. In its constructor, the Grid should be initialized so that a Cell object is stored at each location. b. setupLiveNeighbors. A method to randomly initialize the grid with live bombs. The method should utilize the Difficulty property to determine what percentage of the cells in the grid will be set to "live" status. c. calculate LiveNeighbors. A method to calculate the live neighbors for every cell on the grid. A cell should have between 0 and 8 live neighbors. If a cell itself is "live", then you can set the neighbor count to 9. 5. Program a. The Program class should be the console app that drives the application. This is the class that should contain a main() method. The main program should have a printBoard helper method that uses, for loops, the Console.Write and Console.WriteLine commands to display the contents of the Board as shown at the beginning of these instructions. 6. The main() method should a. Create an instance of the Board class b. Call the Board.setupLiveNeighbors and Board.calculate LiveNeighbors commands to initialize the grid. c. Call the printBoard method to display the contents of the grid. Deliverables Submit the following: 1. ZIP file containing the project folder from Visual Studio, Milestone 2: Interactive Playable Version Overview In this milestone, students will create an interactive playable version of the Minesweeper game. Execution Execute this assignment according to the following guidelines: 2. Create a new helper function inside the Program class that will display the contents of each that have been visited. You might want to name the method PrintBoard DuringGame or something similar. This will be similar to the PrintBoard function developed in Milestone 1 but this time display either the number of live neighbors or an empty square if there are no live neighbors. If a cell has not been visited, print a question mark. @ +1 +2 +3 +4 +5 +6.7.8.9. 10. 11. CTT1112121212121212121 1111111? ? ? ? ? ? 11 iriririririririririririri2 71717171717171717777 I?? 171717171717 171???: I ? ? ? 1717171717!?!?!?!? 121?1?1?1?1?1?1? 1717171716 riririririririririririnig 171717171717171717171717 18 Enter a Row Number Enter a Column Mumber 3. Game Loop Create a playable version of the game in a while loop within the main method of the program class. Use this pseudo code as a guide. while (the game is not over yet) { 1. Ask the user for a row and column number. 2. If the grid contains a bomb at the chosen cell (row, column) then set the endgame condition to true. Display a failure message 3. If all of the non-bomb cells have been revealed, then set the endgame condition to true. Display a success message. 4. Print the grid. Milestone 1: Console Application Overview In this milestone, students will create three classes: Cell, Board, and Program. mware-hostShared Folders\Documents Visual Studio 2017 projects Mir Execution Execute this assignment according to the following guidelines: 2. Create a class that models a game Cell. A game cell should have the following properties: a. Its row and column. These should initially be set to - 1 b. Its visited Boolean value. This should initially be set to false. c. Live Boolean value. This should initially be set to false, "Live" set to true will indicate that the cell is a "live bomb" cell. d. The number of neighbors that are "live." This should initially be set to 0. The Cell class should have a constructor as well as getters and setters for all properties. 3. Create a class that models a game Board. A game board should have the following properties: a. Size. The board will be square, where the size includes the dimensions of both the length and width of the board. b. Grid. The grid will be a 2-dimensional array of the type cell. c. Difficulty. A percentage of cells that will be set to "live" status. 4. The Board class should have the following methods: a. The constructor for the Board should have a single parameter to set the size of the Grid. In its constructor, the Grid should be initialized so that a Cell object is stored at each location. b. setupLiveNeighbors. A method to randomly initialize the grid with live bombs. The method should utilize the Difficulty property to determine what percentage of the cells in the grid will be set to "live" status. c. calculate LiveNeighbors. A method to calculate the live neighbors for every cell on the grid. A cell should have between 0 and 8 live neighbors. If a cell itself is "live", then you can set the neighbor count to 9. 5. Program a. The Program class should be the console app that drives the application. This is the class that should contain a main() method. The main program should have a printBoard helper method that uses, for loops, the Console.Write and Console.WriteLine commands to display the contents of the Board as shown at the beginning of these instructions. 6. The main() method should a. Create an instance of the Board class b. Call the Board.setupLiveNeighbors and Board.calculate LiveNeighbors commands to initialize the grid. c. Call the printBoard method to display the contents of the grid. Deliverables Submit the following: 1. ZIP file containing the project folder from Visual Studio, Milestone 2: Interactive Playable Version Overview In this milestone, students will create an interactive playable version of the Minesweeper game. Execution Execute this assignment according to the following guidelines: 2. Create a new helper function inside the Program class that will display the contents of each that have been visited. You might want to name the method PrintBoard DuringGame or something similar. This will be similar to the PrintBoard function developed in Milestone 1 but this time display either the number of live neighbors or an empty square if there are no live neighbors. If a cell has not been visited, print a question mark. @ +1 +2 +3 +4 +5 +6.7.8.9. 10. 11. CTT1112121212121212121 1111111? ? ? ? ? ? 11 iriririririririririririri2 71717171717171717777 I?? 171717171717 171???: I ? ? ? 1717171717!?!?!?!? 121?1?1?1?1?1?1? 1717171716 riririririririririririnig 171717171717171717171717 18 Enter a Row Number Enter a Column Mumber 3. Game Loop Create a playable version of the game in a while loop within the main method of the program class. Use this pseudo code as a guide. while (the game is not over yet) { 1. Ask the user for a row and column number. 2. If the grid contains a bomb at the chosen cell (row, column) then set the endgame condition to true. Display a failure message 3. If all of the non-bomb cells have been revealed, then set the endgame condition to true. Display a success message. 4. Print the grid

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago