diff --git a/build/test/out/c/quizduell.o b/build/test/out/c/quizduell.o index 9e897df..06e8cb1 100644 Binary files a/build/test/out/c/quizduell.o and b/build/test/out/c/quizduell.o differ diff --git a/build/test/out/test_quizduell.out b/build/test/out/test_quizduell.out index 3607924..deb4ec7 100755 Binary files a/build/test/out/test_quizduell.out and b/build/test/out/test_quizduell.out differ diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 3054f36..9269d11 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.016471099999989747 +:time: 0.01702869999996892 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index b2a7928..3e03b02 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -15,4 +15,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.030837499999961437 +:time: 0.031989800000019386 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 5c20d1a..b5df176 100644 --- a/build/test/results/test_timequiz.pass +++ b/build/test/results/test_timequiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.01623769999991964 +:time: 0.016469199999960438 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index b1bec0d..8e470eb 100644 --- a/build/test/results/test_wwm.pass +++ b/build/test/results/test_wwm.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.01627900000005411 +:time: 0.016439999999988686 diff --git a/src/quizduell.c b/src/quizduell.c index 6ddb0e4..feb71a3 100644 --- a/src/quizduell.c +++ b/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; }