|
@ -20,6 +20,7 @@ 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"); |
|
|
if (kategorien[1].fragen != NULL) printf("Cooking\n"); |
|
|
|
|
|
if (kategorien[2].fragen != NULL) printf("Sports\n"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void quizduell() { |
|
|
void quizduell() { |
|
@ -40,6 +41,13 @@ void quizduell() { |
|
|
kategorien[1].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; |
|
|
kategorien[1].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; |
|
|
kategorien[1].joker = 1; |
|
|
kategorien[1].joker = 1; |
|
|
|
|
|
|
|
|
|
|
|
kategorien[2].fragen = (QuizFrage*)malloc(MAX_QUESTIONS_PER_CATEGORY * sizeof(QuizFrage)); |
|
|
|
|
|
kategorien[2].fragen[0] = erstelleFrage("In which sport is the term 'home run' used?", "Soccer/Football", "Baseball", "Tennis", "Golf", 'B'); |
|
|
|
|
|
kategorien[2].fragen[1] = erstelleFrage("How many players are there normally on the pitch in a soccer/football team?", "9", "11", "7", "5", 'B'); |
|
|
|
|
|
kategorien[2].fragen[2] = erstelleFrage("What sport is played on a pitch and has a 'wicket'?", "Rugby", "Cricket", "American Football", "Hockey", 'B'); |
|
|
|
|
|
kategorien[2].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; |
|
|
|
|
|
kategorien[2].joker = 1; |
|
|
|
|
|
|
|
|
while (1) { |
|
|
while (1) { |
|
|
char auswahl[50]; |
|
|
char auswahl[50]; |
|
|
|
|
|
|
|
|