Question
This is for a hangman game having a bit of a struggle. its for c/c++ programming. Splash Screen (ASCII ART title with creator credits) Print
This is for a hangman game having a bit of a struggle. its for c/c++ programming. Splash Screen (ASCII ART title with creator credits)
Print a logo that you create using any ASCII character art on a 80 column x 25 line display.
- Main Menu
[N]ew game
[I]nstructions
[C]redits
[Q]uit
Remember to get information from the keyboard use the scanf() function. You can be creative on how you design the menu but make sure it is not to confusing so the user has a hard time understanding what the options are.
- Point System
Setup the variables points, numberOfGuesses, and highScore as integers in your main function. The variables points, numberOfGuesses and highScore will be initialized to 0.
- Handle the Menu Choice in step 2
Using a switch statement print something out for each input that the user selects.
Example:
switch (menuOption)
{
case ‘N’:
case ‘n’:
printf(“The user selected the New Game option”);
break;
}
Finish each case statement for each option you have.
The New game option will just print out a message for now. This is where most of our future work will be done.
In the Instructions menu option display the instructions on how to play your game. The user should press a key to stop displaying the instructions and go back to the main menu. Example of some simple instructions are:
"You need to guess the word before you get hanged. You will make a guess by trying different letters. If the letter that you guess is not in the word you will be one step closer to being hanged. To win you must find all the letters in the word."
In the credits for the game, Give yourself credit as the developer of the game by displaying it with this menu option. Here is an example:
Creator:
Programmer:
Publisher:
The quit menu option should set a Boolean variable to true to indicate the player is going to exit the game. We will be including the stdbool.h library in so we can use the bool type and the true, false values.
- Loop the Main Menu
Add a loop around the main menu so that we can repeatedly ask the user for what options they would like to pick. If the variable that we set in the quit option is true we will exit the loop. We can also take out the system(“pause”); that is right before the return(EXIT_SUCCESS); because when the user selects quit, the program should quit.
- Create the Main Game Loop (in the New Game Case Statement created in step 4)
In the game loop printout a hangman game board. Use your creativity when printing out the game board. It should contain a place to draw the hanged man. As well as a place for the Word with underlines for the unguessed letters. You can include an already guessed letter area. You also need a prompt where the user is going to type their guesses. Don’t forget to get the guess they are guessing and store that in a variable.
- Create an array of at least 10 words that one will randomly be selected from as the word to guess
You are going to do this in a multidimensional array. Find a list of words or make up your own words for your hangman game. We will put those words into a multidimensional array as follows:
const int NUMBER_OF_WORDS = 4;
char words[NUMBER_OF_WORDS][] = {“cat”, ”dog”, ”mouse”, ”hamster”};
This example only includes 4 words. This will not make for a very good game after a few games are played. You should probably have at least 100 words in your hangman game.
8. Implement an algorithm to determine of the guessed letter is in the word, or if a word is typed in that the word is the correct word
Step by Step Solution
3.34 Rating (154 Votes )
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