|
@ -21,6 +21,7 @@ void show_letters(char secret_word[100], char guessed_letters[100]); |
|
|
int letter_in_secret_word(char guessed_letter, char secret_word[100]); |
|
|
int letter_in_secret_word(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(); |
|
|
|
|
|
|
|
|
void protokoll(){ |
|
|
void protokoll(){ |
|
|
clear_screen(); |
|
|
clear_screen(); |
|
@ -38,7 +39,7 @@ void clear_screen() { |
|
|
void willkommen(){ |
|
|
void willkommen(){ |
|
|
char ENTERtxt[] = {"-Druecke ENTER zum starten-\n"}; |
|
|
char ENTERtxt[] = {"-Druecke ENTER zum starten-\n"}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
overlay(); |
|
|
printf("%s", ENTERtxt); |
|
|
printf("%s", ENTERtxt); |
|
|
getchar(); |
|
|
getchar(); |
|
|
} |
|
|
} |
|
@ -80,7 +81,7 @@ void nameWaehlen(){ |
|
|
fp = fopen("hangman.txt", "w"); |
|
|
fp = fopen("hangman.txt", "w"); |
|
|
|
|
|
|
|
|
clear_screen(); // |
|
|
clear_screen(); // |
|
|
|
|
|
|
|
|
|
|
|
overlay(); |
|
|
printf("Geben Sie den Namen ein: "); |
|
|
printf("Geben Sie den Namen ein: "); |
|
|
scanf("%s", name); |
|
|
scanf("%s", name); |
|
|
|
|
|
|
|
@ -96,7 +97,7 @@ void startauswahl() { |
|
|
int modus; |
|
|
int modus; |
|
|
|
|
|
|
|
|
clear_screen(); // |
|
|
clear_screen(); // |
|
|
|
|
|
|
|
|
|
|
|
overlay(); |
|
|
printf("Willkommen "); |
|
|
printf("Willkommen "); |
|
|
nameAusgeben(); |
|
|
nameAusgeben(); |
|
|
printf("[1] Spielen\n[2] Namen aendern\n"); |
|
|
printf("[1] Spielen\n[2] Namen aendern\n"); |
|
@ -149,7 +150,7 @@ void levelauswahl(){ |
|
|
int i = 0; |
|
|
int i = 0; |
|
|
|
|
|
|
|
|
clear_screen(); // |
|
|
clear_screen(); // |
|
|
|
|
|
|
|
|
|
|
|
overlay(); |
|
|
|
|
|
|
|
|
FILE *fp = NULL; |
|
|
FILE *fp = NULL; |
|
|
fp = fopen("hangman.txt", "r"); |
|
|
fp = fopen("hangman.txt", "r"); |
|
@ -162,7 +163,7 @@ void levelauswahl(){ |
|
|
levelstr[1] = KonfDatei[i-1]; |
|
|
levelstr[1] = KonfDatei[i-1]; |
|
|
levelstr[2] = '\0'; |
|
|
levelstr[2] = '\0'; |
|
|
level = atoi(levelstr); |
|
|
level = atoi(levelstr); |
|
|
//hauptspiel mit dem Level starten |
|
|
|
|
|
|
|
|
hauptSpiel(level); |
|
|
fclose(fp); |
|
|
fclose(fp); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -372,4 +373,25 @@ void level_plus(){ |
|
|
fp = fopen("hangman.txt", "w"); |
|
|
fp = fopen("hangman.txt", "w"); |
|
|
fprintf(fp, "%s", KonfDatei); |
|
|
fprintf(fp, "%s", KonfDatei); |
|
|
fclose(fp); |
|
|
fclose(fp); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int overlay(){ |
|
|
|
|
|
char hangmanArt[10][41] = { |
|
|
|
|
|
" _______ ", |
|
|
|
|
|
" | | ", |
|
|
|
|
|
" | ", |
|
|
|
|
|
" | ", |
|
|
|
|
|
" | ", |
|
|
|
|
|
" | ", |
|
|
|
|
|
"__|_________\n" |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
printf("Galgenmann!\n"); |
|
|
|
|
|
printf("v.1.0.2\n\n"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 9; i++) { |
|
|
|
|
|
printf("%s\n", hangmanArt[i]); |
|
|
|
|
|
} |
|
|
|
|
|
return 0; |
|
|
} |
|
|
} |