Browse Source

Commit 22 - Buchstaben sollen gezeigt werden

main^2
Peter Wiebe 11 months ago
committed by Peter Wiebe
parent
commit
3e5242d2fc
  1. 10
      src/main/c/hangman.c

10
src/main/c/hangman.c

@ -17,6 +17,7 @@ void draw_hangman(int attempts);
void add_guessed_letter(char* guessed_letters, char guessed_letter);
char eingabe_buchstabe();
void lade_secret_word(char* secret_word, int level, char* path);
void show_letters(char secret_word[100], char guessed_letters[100]);
void protokoll(){
clear_screen();
@ -291,4 +292,13 @@ void lade_secret_word(char* secret_word, int level, char* path){
}
fclose(file);
}
}
void show_letters(char secret_word[100], char guessed_letters[100]){
printf("Erratene Buchstaben: ");
for(int i = 0; i < strlen(secret_word); i++) {
if(strchr(guessed_letters, secret_word[i])){
printf("%c ", secret_word[i]);
}
}
}
Loading…
Cancel
Save