|
|
@ -106,7 +106,10 @@ void hangman() |
|
|
|
{ |
|
|
|
printf("Bitte gib einen Buchstaben ein!\n"); |
|
|
|
scanf(" %c", &userSelection); |
|
|
|
|
|
|
|
if(userSelection == '0') |
|
|
|
{ |
|
|
|
break; |
|
|
|
} |
|
|
|
if(!letterGuessed(userSelection, guessWord, length)) |
|
|
|
{ |
|
|
|
countWrongGuess++; |
|
|
@ -114,7 +117,7 @@ void hangman() |
|
|
|
} |
|
|
|
changeLetter(userSelection, guessWord, length, displayWord); |
|
|
|
drawHangman(countWrongGuess); |
|
|
|
if(userSelection == '0'||wordGuessed(guessWord, displayWord)||noTrysLeft(countWrongGuess,guessWord)) |
|
|
|
if(wordGuessed(guessWord, displayWord)||noTrysLeft(countWrongGuess,guessWord)) |
|
|
|
{ |
|
|
|
break; |
|
|
|
} |
|
|
@ -122,6 +125,7 @@ void hangman() |
|
|
|
} |
|
|
|
|
|
|
|
}while(userSelection != '0'); |
|
|
|
printf("Danke fuers Spielen! Auf Wiedersehen!\n"); |
|
|
|
} |
|
|
|
void getWelcomeMessageHangman() |
|
|
|
{ |
|
|
|