The objectives for this assignment are for you to:
mkdir cse20211/lab8 cd cse20211/lab8
At the beginning of the game, the program should select a word from a list of 10 (or more) secret words, ranging in length from 5 to 12 letters. On each turn, print out the word, but substitute an asterisk for the letters not yet guessed. The player can guess either a single letter, or guess the entire word. If a correct letter is guessed, indicate how many times it appears in the word, and update the display. If a correct word is guessed, display it, and the game is over. The player wins by either revealing all of the letters, or by guessing the whole world in 10 or fewer turns. When the game ends, ask if the player would like to play again.
Here is an example game:
* * * * * * * * Guess a letter or the word: b Good guess! There are 2 Bs in the word. 9 guesses left. B * * * B * * * Guess a letter or the word: Q Sorry, there are no Qs in this word. 8 guesses left. B * * * B * * * Guess a letter or the word: 5 5 is not a letter at all! 7 guesses left. B * * * B * * * Guess a letter or the word: Sorry, the secret word is not basebomb. 6 guesses left. B * * * B * * * Guess a letter or the word: l Good guess! There are 2 Ls in the word. 5 guesses left. B * * * B * L L Guess a letter or the word: BaseBall Correct: the secret word is BASEBALL! Would you like to play again? (yes/no) yes * * * * * Guess a letter or the word: ...Be sure that your program handles the following boundary conditions:
Turn in guess.c and report.txt. Your lab report should cover the assignment, explaning how it works from the user perspective, how the program works internally, and how you verified that the output of the program is correct.