Browse Source

Commit 17 - jeder eingegebene Buchstabe soll dem Array aller eingegebenen Buchstaben hinzugefügt werden

main^2
Peter Wiebe 11 months ago
committed by Peter Wiebe
parent
commit
0402615f5b
  1. 9
      src/main/c/hangman.c

9
src/main/c/hangman.c

@ -14,6 +14,7 @@ void nameAusgeben();
void levelauswahl(); void levelauswahl();
void hauptSpiel(int level); void hauptSpiel(int level);
void draw_hangman(int attempts); void draw_hangman(int attempts);
void add_guessed_letter(char* guessed_letters, char guessed_letter);
void protokoll(){ void protokoll(){
clear_screen(); clear_screen();
@ -249,3 +250,11 @@ void draw_hangman(int attempts) {
break; break;
} }
} }
void add_guessed_letter(char* guessed_letters, char guessed_letter){
for (int i = 0; i < strlen(guessed_letters); i++){
if (guessed_letters[i] == guessed_letter){
return;
}
}
}
Loading…
Cancel
Save