Question
Using C# (USING MONODEV) Classes Start with a blank console application. Add a class named Monster that has the following attributes: string name. Feel free
Using C# (USING MONODEV)
Classes
Start with a blank console application.
Add a class named Monster that has the following attributes: string name. Feel free to make your monster have other attributes, but they are not required. [5 Points]
Create a constructor that accepts the name via parameters to create a new monster. [5 Points]
Create a property for the name field and use it to access the fields. [5 Points]
Arrays and Randomness
Create an empty 1D array that is 13 slots big. Randomly place 3 monsters in the 1D array. These will be hidden to your player, but you may want to output the locations somewhere for yourself during testing and coding. The remainder of the positions should be empty. [5 Points]
Create an empty 1D array that will hold three monsters that you will capture. [5 Points]
Methods, Input/Output, Loops, Conditional Expressions
Write a method that outputs a structure to the console that simulates the array to the console. At the beginning of the game, your playing field will look similar to this: [20 Points]
|
Write a method that asks the user select a square using the numbering from your display. Determine if there is monster in that cell or not and give your user appropriate feedback. This method should be called repeatedly from main until the game is done. If the user selects a square that doesn't contain a monster, give feedback to your player - "hot" means there is a monster in an adjacent cell, "cold" means there is not. If the user selects a square that contains a monster, that monster is considered captured and should be moved to the 1D array that represents the monster jail. [25 Points]
Give your user feedback in the grid output so that they know when a square has already been chosen. Also give your user feedback regarding captured monsters. You can modify your method from 7 to handle this. For example, if the user chose 2, the new grid would look like this: [15 Points] Playing Field
1 | X | 3 |
Captured Monsters
Orc |
Create a mechanism that tracks how many guesses it took to capture all of the monsters. If youd like, make your game so that a user has a limited number of guesses. [10 points]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started