diff --git a/src/main/c/Hangman/playHangman.c b/src/main/c/Hangman/playHangman.c index 4aa6739..59fa7cc 100644 --- a/src/main/c/Hangman/playHangman.c +++ b/src/main/c/Hangman/playHangman.c @@ -93,7 +93,17 @@ void playHangman() { if (mistakes == MAX_MISTAKES) { currentState(currentGuess, mistakes); printf("Oops! You have no more guesses :( \n The answer was: %s \n", wordToGuess); - break; + int retry; + printf("Do you want to retry? \n"); + printf("1. YES\n"); + printf("2. NO\n"); + scanf("%d", &retry); + + if (retry == 1){ + playHangman(); + } else { + break; + } } currentState(currentGuess, mistakes);