|
@ -19,6 +19,7 @@ QuizFrage erstelleFrage(const char* frage, const char* antwortA, const char* ant |
|
|
void zeigeVerfuegbareKategorien(Kategorie kategorien[]) { |
|
|
void zeigeVerfuegbareKategorien(Kategorie kategorien[]) { |
|
|
printf("\nChoose a Category:\n"); |
|
|
printf("\nChoose a Category:\n"); |
|
|
if (kategorien[0].fragen != NULL) printf("Mountains\n"); |
|
|
if (kategorien[0].fragen != NULL) printf("Mountains\n"); |
|
|
|
|
|
if (kategorien[1].fragen != NULL) printf("Cooking\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void quizduell() { |
|
|
void quizduell() { |
|
@ -30,6 +31,13 @@ void quizduell() { |
|
|
kategorien[0].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; |
|
|
kategorien[0].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; |
|
|
kategorien[0].joker = 1; |
|
|
kategorien[0].joker = 1; |
|
|
|
|
|
|
|
|
|
|
|
kategorien[1].fragen = (QuizFrage*)malloc(MAX_QUESTIONS_PER_CATEGORY * sizeof(QuizFrage)); |
|
|
|
|
|
kategorien[1].fragen[0] = erstelleFrage("Which Ingredient is used traditionally for Pesto?", "Tomatoes", "Basil", "Spinach", "Oregano", 'B'); |
|
|
|
|
|
kategorien[1].fragen[1] = erstelleFrage("Which meal is known for its usage of rice?", "Lasagna", "Sushi", "Pizza", "Hamburger", 'B'); |
|
|
|
|
|
kategorien[1].fragen[2] = erstelleFrage("Which color has a ripe banana?", "Red", "Green", "Yellow", "Orange", 'C'); |
|
|
|
|
|
kategorien[1].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; |
|
|
|
|
|
kategorien[1].joker = 1; |
|
|
|
|
|
|
|
|
while (1) { |
|
|
while (1) { |
|
|
char auswahl[50]; |
|
|
char auswahl[50]; |
|
|
|
|
|
|
|
|