Question: create a header file for a c program hangman with these specifications Hangman createHangmanGame(char *puzzleFile) Will create the main Hangman game while loading the initial

create a header file for a c program hangman with these specifications

Hangman createHangmanGame(char *puzzleFile) Will create the main Hangman game while loading the initial set of puzzles into the struct. You can initialize the words and to NULL and the current number of missed guesses to 0.

void newHangmanPuzzle(Hangman currentHangmanGame) Sets up a new puzzle for the player to guess. You will need to randomly select a new puzzle from the array of puzzles in the game.

void loadPuzzleFile(Hangman currentHangmanGame, char *puzzleFile) Will free the previous array for puzzles and load a new set of puzzles from the input file.

bool isPuzzleOver(Hangman currentHangmanGame) Will return whether or not the current puzzle has reached a state where either the player has won or lost.

bool isPuzzleSolved(Hangman currentHangmanGame) Will return whether or not the current puzzle has been solved

. char* getGuessedWord(Hangman currentHangmanGame) Will return the string for the current state of the word that has been guessed thus far (the string that contains both the guessed letters and remaining _)

. bool guessLetter(Hangman currentHangmanGame, char letterToGuess) Will allow the user to guess a letter and then return whether the guessed letter was part of the puzzle word. This function should update the word guessed thus far or increase the number of missed guesses depending on whether the guess was correct.

char* getStateOfHangman(Hangman currentHangmanGame) Will return the string for the current state of HANGMAN.

void freeHangmanGame(Hangman currentHangmanGame) Will free the memory allocated for the game of Hangman.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!