|
|
@ -21,7 +21,7 @@ void casualQuiz() { |
|
|
|
{"The End", "The Termination", "Pizza's ready", "Hotdog Time"}, |
|
|
|
{"12-Pack", "6-Pack", "Family Pack", "One-Pack"}, |
|
|
|
{"Metal", "Plastic", "Humans", "Water"}, |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
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; |
|
|
|
bool already_played = 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("bei: %d beantworteten Fragen", answered); |
|
|
|
correct = 0; |
|
|
@ -41,7 +41,7 @@ void casualQuiz() { |
|
|
|
} |
|
|
|
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; |
|
|
|
bool richtig; |
|
|
|
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(" %d\n", richtige_antwort[i]); |
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
void FzeigeFragen(char* fragen[], int index) { |
|
|
|
printf("Question: %s\n", fragen[index]); |
|
|
|