diff --git a/build/test/out/c/casualQuiz.o b/build/test/out/c/casualQuiz.o index b1c52a9..d6d6ab9 100644 Binary files a/build/test/out/c/casualQuiz.o and b/build/test/out/c/casualQuiz.o differ diff --git a/build/test/out/test_casualQuiz.out b/build/test/out/test_casualQuiz.out index dcbc061..9d0e14c 100755 Binary files a/build/test/out/test_casualQuiz.out and b/build/test/out/test_casualQuiz.out differ diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 58a4d85..d9f8493 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -61,4 +61,4 @@ - Right Answer, well done. - Wrong Input! - Wrong Input! -:time: 0.08586769999237731 +:time: 0.03417200001422316 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index f117652..ac349e2 100644 --- a/build/test/results/test_quizduell.pass +++ b/build/test/results/test_quizduell.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.07707260001916438 +:time: 0.02757249999558553 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 5f20531..fa93c21 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.06622990005416796 +:time: 0.028207200055476278 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 91eaf75..1f12a18 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.06731379998382181 +:time: 0.027035499981138855 diff --git a/src/casualQuiz.c b/src/casualQuiz.c index cacad27..4e80a0f 100644 --- a/src/casualQuiz.c +++ b/src/casualQuiz.c @@ -36,20 +36,10 @@ void casualQuiz() { already_played = activePlaying(easy_fragen, *easy_antworten, easy_richtigeAntworten, length_frag_array, answeredP, correctP); printf("korrekte Antworten: %d\n", correct); printf("bei: %d beantworteten Fragen", answered); + end = FtryAgain(already_played); correct = 0; answered = 0; - if (already_played == true) { - int sure; - printf("Would you like to play again?\n"); - printf("Input 1 to continue Gaming, input 0 to return to the main menu: "); - scanf_s("%d", &sure); - - if (sure == 1) printf("Starting the program up again..."); - else { - printf("Input not '1', returning to main menu..."); - end = true; - } - } + } return; } @@ -144,6 +134,24 @@ void FzaehlernachAuswahl(bool richtig, int* answeredP, int* correctP) { return; } bool FtryAgain(bool already_played){ - + if (already_played == true) { + int sure; + printf("Would you like to play again?\n"); + printf("Input 1 to continue Gaming, input 0 to return to the main menu: "); + scanf_s("%d", &sure); + + if (sure == 1){ + printf("Starting the program up again..."); + return false; + } + else { + printf("Input not '1', returning to main menu..."); + return true; + } + } + else { + printf("It looks like you havent played the program yet, starting it up..."); + return false; + } } \ No newline at end of file