|
|
@ -536,6 +536,18 @@ void play_guessingGame() { |
|
|
|
printf("****************************************\n"); |
|
|
|
} |
|
|
|
|
|
|
|
void v_guessTheWord(char word[], char guessed[]) { |
|
|
|
int i; |
|
|
|
for (i = 0; i < strlen(word); i++) { |
|
|
|
if (guessed[i]) { |
|
|
|
printf("%c ", word[i]); |
|
|
|
} else { |
|
|
|
printf("_ "); |
|
|
|
} |
|
|
|
} |
|
|
|
printf("\n"); |
|
|
|
} |
|
|
|
|
|
|
|
void play_guessTheWord() { |
|
|
|
char word[] = "Fulda"; |
|
|
|
char guessed[MAX_WORD_LENGTH] = {0}; |
|
|
@ -549,6 +561,7 @@ void play_guessTheWord() { |
|
|
|
int correct = 0; |
|
|
|
|
|
|
|
printf("Lives: %d\n", lives); |
|
|
|
v_guessTheWord(word, guessed); |
|
|
|
printf("Guess a letter: "); |
|
|
|
scanf(" %c", &guess); |
|
|
|
|
|
|
|