Browse Source

refactoring: add_guessed_letter --> erratene_buchstaben_hinzufuegen

remotes/origin/peter^2
Peter Wiebe 11 months ago
parent
commit
d462e29b61
  1. 6
      src/main/c/hangman.c

6
src/main/c/hangman.c

@ -15,7 +15,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]);
@ -185,7 +185,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++;
@ -271,7 +271,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;

Loading…
Cancel
Save