Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We're given this problem with these hints You are going to need to use multiple arrays. These arrays correspond to: The secret word that is

image text in transcribed

We're given this problem with these hints

  • You are going to need to use multiple arrays. These arrays correspond to:
    1. The secret word that is being guessed.
    2. The "current board" of letters the user has found.
    3. The list of letters the user has already guessed.
    Think about what is the most appropriate type for each array. They may not all be of type char depending on your implementation.
  • You'll need loops in multiple places:
    1. Continue asking the user for letters until solved or out of guesses
    2. Printing the current puzzle
    3. Checking if the letter exists in the puzzle
    4. Checking if the puzzle is solved

And I'm not sure where to start, any help would be appreciated. Write in C++

Instructions Your goal for this assignment is to create a playable Hangman game. You will need to create a secret word for the user to try and guess one letter at a time. First you need to ask the user to enter a letter. Then you'll check if that letter exists in your secret word. If it does exist, then you should tell the user and display the puzzle with the letter revealed. If the letter does not exist, then inform the user that the letter is not found. You will repeat this process until all the correct letters have been guessed or the user has entered 7 wrong letters Hopefully it is readily clear that you will need to use a loop to keep prompting the user to enter a letter. You will also need to use conditionals to check if the letter exists. You will need to use an array to store the secret letters (since a word is just a collection of letters). We'll also need arrays to keep track of the previously guessed letters (we don't want the player to guess wrong a second time) and the solved letters. Instructions Your goal for this assignment is to create a playable Hangman game. You will need to create a secret word for the user to try and guess one letter at a time. First you need to ask the user to enter a letter. Then you'll check if that letter exists in your secret word. If it does exist, then you should tell the user and display the puzzle with the letter revealed. If the letter does not exist, then inform the user that the letter is not found. You will repeat this process until all the correct letters have been guessed or the user has entered 7 wrong letters Hopefully it is readily clear that you will need to use a loop to keep prompting the user to enter a letter. You will also need to use conditionals to check if the letter exists. You will need to use an array to store the secret letters (since a word is just a collection of letters). We'll also need arrays to keep track of the previously guessed letters (we don't want the player to guess wrong a second time) and the solved letters

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_2

Step: 3

blur-text-image_3

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

Making Databases Work The Pragmatic Wisdom Of Michael Stonebraker

Authors: Michael L. Brodie

1st Edition

1947487167, 978-1947487161

More Books

Students also viewed these Databases questions