Question
C#: Create a game similar to Hangman named GuessAWord in which a player guesses letters to try to replicate a hidden word. Store at least
C#:
Create a game similar to Hangman named GuessAWord in which a player guesses letters to try to replicate a hidden word. Store at least eight words in an array, and randomly select one to be the hidden word.
Initially, display the hidden word using asterisks to represent each letter. Allow the user to guess letters to replace the asterisks in the hidden word until the user completes the entire word.
If the user guesses a letter that is not in the hidden word, display an appropriate message.
If the user guesses a letter that appears multiple times in the hidden word, make sure that each correct letter is placed.
0 + GuessAWord.cs Instructions 1 using System; 2 using static System.Console; 3 class GuessAWord 4 { in This problem relies on the generation of a random number. You can create a random number that is at least min but less than max using the following statements: 6 7 static void Main() { // Write your main here 0 . Random ranNumber Generator = new R int randomNumber; randomNumber = ranNumber Generator Create a game similar to Hangman named GuessAWord in which a player guesses letters to try to replicate a hidden word. Store at least eight words in an array, and randomly select one to be the hidden word. Initially, display the hidden word using asterisks to represent each letter. Allow the user to guess letters to replace the asterisks in the hidden word until the user completes the entire word. 0 Instructions GuessAWord.cs + > 1 using System; 2 using static System.Console; 3 class GuessAWord If the user guesses a letter that is not in the hidden word, display an appropriate message. static void Main() // Write your main here If the user guesses a letter that appears multiple times in the hidden word, make sure that each correct letter is placed. 600 9} Figure 6-27 shows a typical game in progress. Word: ********* Guess a letter >> S Sorry. s is not in the word Word: ********* Guess a letter >> e Yes! e is in the word Word: ******** Guess a letter >> r Yes! r is in the word word: ********e Guess a letter >> a Yes! a is in the word Word: **p***a*e Guess a letter >>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