From 416d01bce77f02f895ed86f9396248bc1149d8ab Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Wed, 7 Feb 2024 09:51:33 +0100 Subject: [PATCH] refactoring: show_letters --> zeige_Buchstabenfeld --- 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 b558f02..81d746d 100644 --- a/src/main/c/hangman.c +++ b/src/main/c/hangman.c @@ -18,7 +18,7 @@ void zeichne_galgen(int versuche); 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 show_letters(char secret_word[100], char guessed_letters[100]); +void zeige_Buchstabenfeld(char secret_word[100], char guessed_letters[100]); int letter_in_secret_word(char guessed_letter, char secret_word[100]); int has_won(char secret_word[100], char guessed_letters[100]); void level_plus(); @@ -181,7 +181,7 @@ void hauptSpiel(int level){ while (versuche < 6 && won == 0) { zeichne_galgen(versuche); - show_letters(secret_word, guessed_letters); + zeige_Buchstabenfeld(secret_word, guessed_letters); guessed_letter = eingabe_buchstabe(); result = letter_in_secret_word(guessed_letter, secret_word); if (result == 0){ @@ -311,7 +311,7 @@ void hole_zu_erratendes_wort(char* secret_word, int level, char* path){ } } -void show_letters(char secret_word[100], char guessed_letters[100]){ +void zeige_Buchstabenfeld(char secret_word[100], char guessed_letters[100]){ printf("Erratene Buchstaben: "); for(int i = 0; i < strlen(secret_word); i++) { if(strchr(guessed_letters, secret_word[i])){