From eef1885341c7fe5aa7fef2aa9999bed7098f6fb2 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 847a301..4a8045d 100644 --- a/src/main/c/hangman.c +++ b/src/main/c/hangman.c @@ -15,6 +15,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(); @@ -249,4 +250,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