Browse Source

Kategorienauswahl

remotes/origin/Kevin
Kevin Schellberg 12 months ago
parent
commit
2913d506dd
  1. BIN
      build/test/out/c/quizduell.o
  2. BIN
      build/test/out/test_quizduell.out
  3. 2
      build/test/results/test_casualQuiz.pass
  4. 2
      build/test/results/test_quizduell.pass
  5. 2
      build/test/results/test_timequiz.pass
  6. 2
      build/test/results/test_wwm.pass
  7. 17
      src/quizduell.c

BIN
build/test/out/c/quizduell.o

BIN
build/test/out/test_quizduell.out

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.016471099999989747
:time: 0.01702869999996892

2
build/test/results/test_quizduell.pass

@ -15,4 +15,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.030837499999961437
:time: 0.031989800000019386

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.01623769999991964
:time: 0.016469199999960438

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.01627900000005411
:time: 0.016439999999988686

17
src/quizduell.c

@ -63,6 +63,23 @@ void quizduell() {
printf("Your selection: ");
scanf("%s", auswahl);
int auswahlIndex = -1;
for (int i = 0; i < MAX_CATEGORIES; i++) {
if (kategorien[i].fragen != NULL && strcmp(auswahl, "Mountains") == 0) {
auswahlIndex = 0;
break;
}
else if (kategorien[i].fragen != NULL && strcmp(auswahl, "Cooking") == 0) {
auswahlIndex = 1;
break;
}
else if (kategorien[i].fragen != NULL && strcmp(auswahl, "Sports") == 0) {
auswahlIndex = 2;
break;
}
}
return;
}
Loading…
Cancel
Save