|
@ -93,7 +93,17 @@ void playHangman() { |
|
|
if (mistakes == MAX_MISTAKES) { |
|
|
if (mistakes == MAX_MISTAKES) { |
|
|
currentState(currentGuess, mistakes); |
|
|
currentState(currentGuess, mistakes); |
|
|
printf("Oops! You have no more guesses :( \n The answer was: %s \n", wordToGuess); |
|
|
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); |
|
|
currentState(currentGuess, mistakes); |
|
|