Browse Source

all letters guessed correctly

remotes/origin/Saba
Saba Fazlali 11 months ago
parent
commit
575824a102
  1. 8
      src/main/c/Hangman/playHangman.c

8
src/main/c/Hangman/playHangman.c

@ -46,6 +46,14 @@ void playHangman(char *wordToGuess) {
mistakes++; mistakes++;
} }
// Check if the player guessed all the letters
if (strcmp(currentGuess,wordToGuess) == 0){
currentState(currentGuess, mistakes);
printf("Bravo! You guessed the word: %s \n", wordToGuess);
break;
}
} }
} }
Loading…
Cancel
Save