Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program where the user must try to the guess the random number chosen by the computer. This can be a GUI program or

Write a program where the user must try to the guess the random number chosen by the computer. This can be a GUI program or a console app. Extra credit will be given for GUI app. Your game should have a level of difficulty option of Easy, Medium, or Difficult. The Easy level will be a number between 1 - 100, Medium level is a number between 1 - 1,000 and the Difficult level is a number between 1 - 10,000.

Allow the user only 10 tries to guess the number. If they are unable to guess the number after 10 tries, display a chastising message letting them know they have lost. Be sure to let them know what the random number was. Then give the player the option to play another game. If the player chooses to play again, remember to allow them to choose a different level of difficulty.

A new random number needs to be generated for the computer at the beginning of every new game that is within the chosen range of difficulty level.

If you are writing a GUI app then the following must apply: 1. The form must contain 3 Radio buttons for choosing a level of game play (Easy, Medium, or Difficult. When the game starts the Radio buttons and the Exit buttons are enabled. All other buttons are disabled. When the user chooses a level, the radio buttons become disabled and the Guess button will become enabled.

2. The form should contain a text box where the user can enter a guess.

3. It should contain a button for the user to test their guess. This button should be disabled until

the user chooses a difficulty level.

4. The form should contain a label to display the results of the guess. Inform the player if the

guess was too low or too high or they won.

5. If it is correct, then let them know they have won. At this point the Guess button will become disabled and the Play Again button will become enabled. If the user clicks the Play Again button, then the radio buttons become enabled and all the other buttons become disabled.

6. The form should have a Play Again button that becomes enabled after a player either wins or loses a game. When the user clicks this button, the difficulty level options are enabled again, the message label box is cleared out as well as the text box where the user enters their guess. And the Play Again button becomes disabled.

7. The form should contain 2 labels, one for the count of wins and one for the count of loses.

8. The form should also contain a label that either displays the number of tries used so far or the

number of tries left.

9. Don't forget to include a close or exit button.

Please code in C# language. Its up to you if you want to include the GUI or just be a console app. Thank you.

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

More Books

Students also viewed these Databases questions