diff --git a/src/main/c/hangman.c b/src/main/c/hangman.c index 04fcdd1..1182223 100644 --- a/src/main/c/hangman.c +++ b/src/main/c/hangman.c @@ -14,6 +14,7 @@ void nameAusgeben(); void levelauswahl(); void hauptSpiel(int level); void draw_hangman(int attempts); +void add_guessed_letter(char* guessed_letters, char guessed_letter); void protokoll(){ clear_screen(); @@ -248,4 +249,12 @@ void draw_hangman(int attempts) { default: 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; + } + } } \ No newline at end of file