|
@ -19,7 +19,7 @@ void erratenen_buchstaben_hinzufuegen(char* guessed_letters, char guessed_letter |
|
|
char eingabe_buchstabe(); |
|
|
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 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]); |
|
|
int has_won(char secret_word[100], char guessed_letters[100]); |
|
|
void level_plus(); |
|
|
void level_plus(); |
|
|
int overlay(); |
|
|
int overlay(); |
|
@ -183,7 +183,7 @@ void hauptSpiel(int level){ |
|
|
zeichne_galgen(versuche); |
|
|
zeichne_galgen(versuche); |
|
|
zeige_Buchstabenfeld(secret_word, guessed_letters); |
|
|
zeige_Buchstabenfeld(secret_word, guessed_letters); |
|
|
guessed_letter = eingabe_buchstabe(); |
|
|
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){ |
|
|
if (result == 0){ |
|
|
erratenen_buchstaben_hinzufuegen(guessed_letters, guessed_letter); |
|
|
erratenen_buchstaben_hinzufuegen(guessed_letters, guessed_letter); |
|
|
} |
|
|
} |
|
@ -324,7 +324,7 @@ void zeige_Buchstabenfeld(char secret_word[100], char guessed_letters[100]){ |
|
|
printf("\n"); |
|
|
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++){ |
|
|
for(int i = 0; i < strlen(secret_word); i++){ |
|
|
if(guessed_letter == secret_word[i]){ |
|
|
if(guessed_letter == secret_word[i]){ |
|
|
return 0; |
|
|
return 0; |
|
|