Question
I can create the arrays, but I can't collect the guess and compare it... Problem: The guessing game. The user will try and guess a
I can create the arrays, but I can't collect the guess and compare it...
Problem: The guessing game. The user will try and guess a word. You will randomly load a word from your guessArray and display it to the user so the user will try and guess the missing letters in the word. The user will only be allowed 8 guesses and then they will lose the game. If they lose the game, you will show them the word that they could not guess; if they won the game, tell them they guessed correctly and show them the word they guessed correctly. You must write this game using functions and call the functions from main. You are NOT allowed to use any global variables; you must declare your arrays in main and pass them into your functions as needed. You will pre-load a 2D array called "guessArray" as follows:
C * R *
* R * *
* O * T
* R * E
* * N *
Then preload another array called "answerArray":
C A R S
A R M S
B O A T
T R E E
L I N K
Notice how row 0 of guessArray is the same word as row 0 of answerArray.
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