Browse Source

refactoring: has_won --> gewonnen

main^2
Peter Wiebe 11 months ago
committed by Peter Wiebe
parent
commit
07439b6684
  1. 6
      src/main/c/hangman.c

6
src/main/c/hangman.c

@ -19,7 +19,7 @@ char eingabe_buchstabe();
void hole_zu_erratendes_wort(char* secret_word, int level, char* path); void hole_zu_erratendes_wort(char* secret_word, int level, char* path);
void zeige_Buchstabenfeld(char secret_word[100], char guessed_letters[100]); void zeige_Buchstabenfeld(char secret_word[100], char guessed_letters[100]);
int buchstabe_im_zu_erratenden_wort(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]);
int gewonnen(char secret_word[100], char guessed_letters[100]);
void level_plus(); void level_plus();
int overlay(); int overlay();
@ -189,7 +189,7 @@ void hauptSpiel(int level){
else { else {
versuche++; versuche++;
} }
won = has_won(secret_word, guessed_letters);
won = gewonnen(secret_word, guessed_letters);
} }
if (won == 1){ if (won == 1){
level_plus(); level_plus();
@ -332,7 +332,7 @@ int buchstabe_im_zu_erratenden_wort(char guessed_letter, char secret_word[100]){
return 1; return 1;
} }
int has_won(char secret_word[100], char guessed_letters[100]){
int gewonnen(char secret_word[100], char guessed_letters[100]){
int occured; int occured;
for (int i = 0; i < strlen(secret_word); i++){ for (int i = 0; i < strlen(secret_word); i++){
occured = 0; occured = 0;

Loading…
Cancel
Save