|
@ -13,6 +13,16 @@ void initializeHangman(char *wordToGuess, char *currentGuess) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void printRules(){ |
|
|
void printRules(){ |
|
|
printf("Rules: \n"); |
|
|
|
|
|
|
|
|
printf("Welcome to hangman game!\n"); |
|
|
|
|
|
printf("How to play: \n"); |
|
|
|
|
|
printf(" - A word be randomly selected from the list of words.\n"); |
|
|
|
|
|
printf(" - A series of dashes will be displayed, each representing a letter in the secret word.\n"); |
|
|
|
|
|
printf(" - You are allowed a maximum of 6 mistakes.\n"); |
|
|
|
|
|
printf(" - You will start guessing letters one at a time.\n"); |
|
|
|
|
|
printf(" - Each guess should be a single letter of the alphabet, either uppercase or lowercase.\n"); |
|
|
|
|
|
printf(" - After each guess, the computer will check if the letter you guessed is in the secret word.\n"); |
|
|
|
|
|
printf(" - If the guessed letter is in the word, the computer will reveal all occurrences of that letter in the word.\n"); |
|
|
|
|
|
printf(" - If the guessed letter is not in the word, the computer will count the incorrect guesses.\n"); |
|
|
|
|
|
printf(" - Wrong guesses are represented by drawing parts of a hangman figure.\n"); |
|
|
printf(" - You are allowed a maximum of 6 mistakes.\n"); |
|
|
printf(" - You are allowed a maximum of 6 mistakes.\n"); |
|
|
} |
|
|
} |