Part 1: Loading and processing phrases
For your hangman game, you will need some phrases for the user to guess. The first step is to load the phrases from a file, initialize the attributes of each phrase, and sort them by difficulty. To verify that this part is working, you will temporary display all of the phrases.
Create a struct called Phrase that has three members:
A string called text that will store the text of a phrase.
An unsigned int named guessesRequired that will contain the minimum number of guesses required. Note that this member can never be negative.
A bool named isUsed that will be set from false to true if and when a phrase is used.
Create the following functions:
uniqueLetterCount: Accepts a constant reference to a string and returns the number of unique letters in that strin
The post Loading and processing phrases appeared first on Assignment Freelancers.