Browse Source

Kategorie3

remotes/origin/Kevin
Kevin Schellberg 11 months ago
parent
commit
3c12a34368
  1. 2
      build/test/results/test_casualQuiz.pass
  2. 2
      build/test/results/test_quizduell.pass
  3. 2
      build/test/results/test_timequiz.pass
  4. 2
      build/test/results/test_wwm.pass
  5. 8
      src/quizduell.c

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.016109799999981078
:time: 0.01711440000008224

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.016670100000055754
:time: 0.017044999999939137

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01621090000003278
:time: 0.01672519999999622

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.01656690000004346
:time: 0.016789599999924576

8
src/quizduell.c

@ -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];

Loading…
Cancel
Save