From d58d71ddd1dafa180c0ca2cee7315dd9af094ec8 Mon Sep 17 00:00:00 2001 From: Florian Baeseler Date: Tue, 6 Feb 2024 18:33:44 +0100 Subject: [PATCH] =?UTF-8?q?refactoring:=20Auslagern=20der=20Z=C3=A4hler,?= =?UTF-8?q?=20f=C3=BCr=20mehr=20=C3=BCbersicht=20im=20Code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/test/out/c/casualQuiz.o | Bin 9169 -> 9583 bytes build/test/out/test_casualQuiz.out | Bin 116411 -> 117473 bytes build/test/results/test_casualQuiz.pass | 2 +- build/test/results/test_quizduell.pass | 2 +- build/test/results/test_timequiz.pass | 2 +- build/test/results/test_wwm.pass | 2 +- src/casualQuiz.c | 38 +++++++++++++----------- src/casualQuiz.h | 1 + 8 files changed, 26 insertions(+), 21 deletions(-) diff --git a/build/test/out/c/casualQuiz.o b/build/test/out/c/casualQuiz.o index 6db6dfd5fd4c5e8071089c3ef3ba7ebfe6d884f5..49e749fbc19b9954705917d82d2e3f2c2927d31c 100644 GIT binary patch delta 3704 zcmZu!e{5679lv|e&w0snuw!G#aeh5JY08q2g)s&sKob-P2a*Z4dJVL+n8dLSmctyU zjWUqg(oI-V*P2uF2aQHsjdenlp=D|}X`!9QR{GbdIF zO?jqHR4HxB>!GDDC^vYhJ60O;#7gnta4BjIltwnZ75x-L|K*ZsbOaxH1>k)A)7X48 z7%Tna&by$-p3#m#WK_}d&hwy@qW9)Uz$c^&m6GSfz<>E#(}z`*JUE)?@Gpg~ZxIRIC-&>DP&Dop zIlZfY5z^QSOTzYjDBXaueHCWB12DEXp~L`VThw9!(0wYuEjAiKd0E)z`q7k7UM zI_AaltYM+S*+ep(P3Cinv2_3R)KiIcmMK{$Ee_mK_~Kbenv&0qr3;x9cr;sjnK{s^ zWH-Km=CbbSvecbYEqdxN*;#5wKaffA<0rDyQ%uQOlTpfPo){lz$_ZN?XWsYhPJY>E zwL`)7fGetT<%!*slUb(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7zko1}>o4U4Ph);}(SWB)zgI}F zQP_~0GaC-lpm8@5BwsV+Y>;;Nfth1ASs)cV`rn?`fS5HlTO)z&n2O%j?Jg()XX)^Dyet z%>%jq*zi^meB_Y-Gd6m$z`*qwycas?RF8Wv4PRp_B)(wGwArM|H%vdj>jJ1 H$3y-bm4AoN diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 0f88edb..e6f4a09 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -45,4 +45,4 @@ - Right Answer, well done. - Wrong Input! - Wrong Input! -:time: 0.034674599999561906 +:time: 0.03563229998690076 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index ff4134e..6c3f8de 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.013722000003326684 +:time: 0.01542800001334399 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 7957b2c..7283a5f 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.013790600001811981 +:time: 0.015153000014834106 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index 037c63a..90979a7 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.014121699990937486 +:time: 0.014826200000243261 diff --git a/src/casualQuiz.c b/src/casualQuiz.c index 42a4ab1..536c033 100644 --- a/src/casualQuiz.c +++ b/src/casualQuiz.c @@ -7,7 +7,7 @@ void casualQuiz() { printf("Print aus der Funktion Casual Quiz"); - int index = 0; + int index = 0; char* easy_fragen[] = { //eingabe der Fragen in ein Array "Which Disney character famously leaves a glass shoe behind at a royal ball?", "The hammer and sickle are one of the most recognisable symbols of which political ideology?", @@ -16,18 +16,18 @@ void casualQuiz() { {"Elsa", "Rapunzel", "Cinderella", "Pocahontas"}, {"Republicanism", "Liberalism", "Conservatism", "Communism"}, }; - int easy_richtigeAntworten[] = { 3,4}; // int, um die jeweils richtige antwort zu zeigen + int easy_richtigeAntworten[] = { 3,4 }; // int, um die jeweils richtige antwort zu zeigen - int length_frag_array = sizeof(easy_richtigeAntworten)/sizeof(int); + int length_frag_array = sizeof(easy_richtigeAntworten) / sizeof(int); int correct = 0; int answered = 0; - int *correctP = &correct; - int *answeredP = &answered; + int* correctP = &correct; + int* answeredP = &answered; - activePlaying(easy_fragen, *easy_antworten, easy_richtigeAntworten, length_frag_array, answeredP, correctP); + activePlaying(easy_fragen, *easy_antworten, easy_richtigeAntworten, length_frag_array, answeredP, correctP); printf("korrekte Antworten: %d\n", correct); printf("bei: %d beantworteten Fragen", answered); - return; + return; } void activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], int size, int* answeredP, int* correctP) { int eingabe; @@ -40,16 +40,7 @@ void activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], in printf("Please type in your answer 1,2,3 or 4: "); eingabe = FEingabeInteger(); richtig = FcheckaufRichtigkeit(eingabe, richtige_antwort, i); - if (richtig == true){ - int plus = *answeredP + 1; - *answeredP = plus; - int add = *correctP + 1; - *correctP = add; - } - else{ - int plus = *answeredP + 1; - *answeredP = plus; - } + FzaehlernachAuswahl(richtig, answeredP, correctP); printf("Bool richtig / falsch: %d\n", richtig); printf(" %d\n", richtige_antwort[i]); } @@ -113,4 +104,17 @@ bool FcheckaufRichtigkeit(int eingabe, int richtige_antwort[], int i) { } } return false; +} +void FzaehlernachAuswahl(bool richtig, int* answeredP, int* correctP) { + if (richtig == true) { + int plus = *answeredP + 1; + *answeredP = plus; + int add = *correctP + 1; + *correctP = add; + } + else { + int plus = *answeredP + 1; + *answeredP = plus; + } + return; } \ No newline at end of file diff --git a/src/casualQuiz.h b/src/casualQuiz.h index 55dff24..63507a9 100644 --- a/src/casualQuiz.h +++ b/src/casualQuiz.h @@ -7,5 +7,6 @@ void FzeigeFragen(char *fragen[], int index); void FzeigeAntworten(char *antworten[], int index); int FEingabeInteger(); bool FcheckaufRichtigkeit(int eingabe, int richtige_antwort[],int i); +void FzaehlernachAuswahl(bool richtig, int* answeredP, int* correctP); #endif // ende CASUALQUIZ_H