|
|
@ -22,6 +22,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 has_won(char secret_word[100], char guessed_letters[100]); |
|
|
|
void level_plus(); |
|
|
|
int overlay(); |
|
|
|
|
|
|
|
void protokoll(){ |
|
|
|
clear_screen(); |
|
|
@ -39,7 +40,7 @@ void clear_screen() { |
|
|
|
void willkommen(){ |
|
|
|
char ENTERtxt[] = {"-Druecke ENTER zum starten-\n"}; |
|
|
|
|
|
|
|
|
|
|
|
overlay(); |
|
|
|
printf("%s", ENTERtxt); |
|
|
|
getchar(); |
|
|
|
} |
|
|
@ -81,7 +82,7 @@ void nameWaehlen(){ |
|
|
|
fp = fopen("hangman.txt", "w"); |
|
|
|
|
|
|
|
clear_screen(); // |
|
|
|
|
|
|
|
overlay(); |
|
|
|
printf("Geben Sie den Namen ein: "); |
|
|
|
scanf("%s", name); |
|
|
|
|
|
|
@ -97,7 +98,7 @@ void startauswahl() { |
|
|
|
int modus; |
|
|
|
|
|
|
|
clear_screen(); // |
|
|
|
|
|
|
|
overlay(); |
|
|
|
printf("Willkommen "); |
|
|
|
nameAusgeben(); |
|
|
|
printf("[1] Spielen\n[2] Namen aendern\n"); |
|
|
@ -150,7 +151,7 @@ void levelauswahl(){ |
|
|
|
int i = 0; |
|
|
|
|
|
|
|
clear_screen(); // |
|
|
|
|
|
|
|
overlay(); |
|
|
|
|
|
|
|
FILE *fp = NULL; |
|
|
|
fp = fopen("hangman.txt", "r"); |
|
|
@ -163,7 +164,7 @@ void levelauswahl(){ |
|
|
|
levelstr[1] = KonfDatei[i-1]; |
|
|
|
levelstr[2] = '\0'; |
|
|
|
level = atoi(levelstr); |
|
|
|
//hauptspiel mit dem Level starten |
|
|
|
hauptSpiel(level); |
|
|
|
fclose(fp); |
|
|
|
} |
|
|
|
|
|
|
@ -373,4 +374,25 @@ void level_plus(){ |
|
|
|
fp = fopen("hangman.txt", "w"); |
|
|
|
fprintf(fp, "%s", KonfDatei); |
|
|
|
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; |
|
|
|
} |