From 0402615f5b891178b50979ee596c96589cbffed3 Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Tue, 6 Feb 2024 18:24:06 +0100 Subject: [PATCH] =?UTF-8?q?Commit=2017=20-=20jeder=20eingegebene=20Buchsta?= =?UTF-8?q?be=20soll=20dem=20Array=20aller=20eingegebenen=20Buchstaben=20h?= =?UTF-8?q?inzugef=C3=BCgt=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/c/hangman.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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