From 936934f3b9f2f408073b1b8fee94b2499544f4e6 Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Wed, 7 Feb 2024 09:53:07 +0100 Subject: [PATCH] refactoring: letter_in_secret_word --> Buchstabe_im_zu_erratenden_wort --- 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 81d746d..bc7d492 100644 --- a/src/main/c/hangman.c +++ b/src/main/c/hangman.c @@ -19,7 +19,7 @@ void erratenen_buchstaben_hinzufuegen(char* guessed_letters, char guessed_letter char eingabe_buchstabe(); void hole_zu_erratendes_wort(char* secret_word, int level, char* path); void zeige_Buchstabenfeld(char secret_word[100], char guessed_letters[100]); -int letter_in_secret_word(char guessed_letter, char secret_word[100]); +int buchstabe_im_zu_erratenden_wort(char guessed_letter, char secret_word[100]); int has_won(char secret_word[100], char guessed_letters[100]); void level_plus(); int overlay(); @@ -183,7 +183,7 @@ void hauptSpiel(int level){ zeichne_galgen(versuche); zeige_Buchstabenfeld(secret_word, guessed_letters); guessed_letter = eingabe_buchstabe(); - result = letter_in_secret_word(guessed_letter, secret_word); + result = buchstabe_im_zu_erratenden_wort(guessed_letter, secret_word); if (result == 0){ erratenen_buchstaben_hinzufuegen(guessed_letters, guessed_letter); } @@ -324,7 +324,7 @@ void zeige_Buchstabenfeld(char secret_word[100], char guessed_letters[100]){ printf("\n"); } -int letter_in_secret_word(char guessed_letter, char secret_word[100]){ +int buchstabe_im_zu_erratenden_wort(char guessed_letter, char secret_word[100]){ for(int i = 0; i < strlen(secret_word); i++){ if(guessed_letter == secret_word[i]){ return 0;