|
@ -21,7 +21,7 @@ void casualQuiz() { |
|
|
{"The End", "The Termination", "Pizza's ready", "Hotdog Time"}, |
|
|
{"The End", "The Termination", "Pizza's ready", "Hotdog Time"}, |
|
|
{"12-Pack", "6-Pack", "Family Pack", "One-Pack"}, |
|
|
{"12-Pack", "6-Pack", "Family Pack", "One-Pack"}, |
|
|
{"Metal", "Plastic", "Humans", "Water"}, |
|
|
{"Metal", "Plastic", "Humans", "Water"}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
int easy_richtigeAntworten[] = { 3,4,1,2,1 }; // int, um die jeweils richtige antwort zu zeigen |
|
|
int easy_richtigeAntworten[] = { 3,4,1,2,1 }; // int, um die jeweils richtige antwort zu zeigen |
|
|
|
|
|
|
|
@ -32,8 +32,8 @@ void casualQuiz() { |
|
|
int* answeredP = &answered; |
|
|
int* answeredP = &answered; |
|
|
bool already_played = false; |
|
|
bool already_played = false; |
|
|
bool end = false; |
|
|
bool end = false; |
|
|
while (end == false){ |
|
|
|
|
|
activePlaying(easy_fragen, *easy_antworten, easy_richtigeAntworten, length_frag_array, answeredP, correctP); |
|
|
|
|
|
|
|
|
while (end == false) { |
|
|
|
|
|
already_played = activePlaying(easy_fragen, *easy_antworten, easy_richtigeAntworten, length_frag_array, answeredP, correctP); |
|
|
printf("korrekte Antworten: %d\n", correct); |
|
|
printf("korrekte Antworten: %d\n", correct); |
|
|
printf("bei: %d beantworteten Fragen", answered); |
|
|
printf("bei: %d beantworteten Fragen", answered); |
|
|
correct = 0; |
|
|
correct = 0; |
|
@ -41,7 +41,7 @@ void casualQuiz() { |
|
|
} |
|
|
} |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
void activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], int size, int* answeredP, int* correctP) { |
|
|
|
|
|
|
|
|
bool activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], int size, int* answeredP, int* correctP) { |
|
|
int eingabe; |
|
|
int eingabe; |
|
|
bool richtig; |
|
|
bool richtig; |
|
|
for (int i = 0; i < size; i++) { |
|
|
for (int i = 0; i < size; i++) { |
|
@ -56,6 +56,7 @@ void activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], in |
|
|
printf("Bool richtig / falsch: %d\n", richtig); |
|
|
printf("Bool richtig / falsch: %d\n", richtig); |
|
|
printf(" %d\n", richtige_antwort[i]); |
|
|
printf(" %d\n", richtige_antwort[i]); |
|
|
} |
|
|
} |
|
|
|
|
|
return true; |
|
|
} |
|
|
} |
|
|
void FzeigeFragen(char* fragen[], int index) { |
|
|
void FzeigeFragen(char* fragen[], int index) { |
|
|
printf("Question: %s\n", fragen[index]); |
|
|
printf("Question: %s\n", fragen[index]); |
|
|