From 2c51cf5cbe5702ff085e61fcd71f4b7e9d8a9380 Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Wed, 7 Feb 2024 09:48:36 +0100 Subject: [PATCH] refactoring: add_guessed_letter --> erratene_buchstaben_hinzufuegen --- src/main/c/hangman.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/c/hangman.c b/src/main/c/hangman.c index cd929fc..ac6e736 100644 --- a/src/main/c/hangman.c +++ b/src/main/c/hangman.c @@ -14,7 +14,7 @@ void nameAusgeben(); void levelauswahl(); void hauptSpiel(int level); void zeichne_galgen(int versuche); -void add_guessed_letter(char* guessed_letters, char guessed_letter); +void erratenen_buchstaben_hinzufuegen(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]); @@ -184,7 +184,7 @@ void hauptSpiel(int level){ guessed_letter = eingabe_buchstabe(); result = letter_in_secret_word(guessed_letter, secret_word); if (result == 0){ - add_guessed_letter(guessed_letters, guessed_letter); + erratenen_buchstaben_hinzufuegen(guessed_letters, guessed_letter); } else { versuche++; @@ -270,7 +270,7 @@ void zeichne_galgen(int versuche) { } } -void add_guessed_letter(char* guessed_letters, char guessed_letter){ +void erratenen_buchstaben_hinzufuegen(char* guessed_letters, char guessed_letter){ for (int i = 0; i < strlen(guessed_letters); i++){ if (guessed_letters[i] == guessed_letter){ return;