From 594fcfe5e923120701fa39d4209743c3814a47ca Mon Sep 17 00:00:00 2001 From: Florian Baeseler Date: Fri, 9 Feb 2024 16:36:30 +0100 Subject: [PATCH] =?UTF-8?q?M=C3=B6glichkeit=20hinzugef=C3=BCgt,=20das=20Pr?= =?UTF-8?q?ogramm=20zu=20beenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/test/out/c/casualQuiz.o | Bin 11305 -> 11585 bytes build/test/out/test_casualQuiz.out | Bin 122076 -> 122076 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 | 7 ++++++- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/build/test/out/c/casualQuiz.o b/build/test/out/c/casualQuiz.o index d6d6ab9b012fe053237669d98edcf7d9cc2ef30d..c1fdb59ba16191d5efa67e84c42bde65b8d527f0 100644 GIT binary patch delta 3325 zcmZuze{5679lyKh_w3ltPsb#V9sA|ClaQD|S(H#9A&r|*8pz6Mmk!d0{o)uoc4|8< zL8GQDU5T=2Sl3ciA%v==`=P09N=um#8?9DN?X<0{_JjThlR$JCmAWy}3M%%!cP~fU z?IgeZd_Uh`_r34k$v=7Gosq)m_lpo4&jk@`&ld&?ZmEWhM)Dh9AqVU8fAE)HvLJNJ zj?h8_SIPM=y~>-#2>rEz`mx`Bz=lwH8A7KUX&C#JP6FYo=mFfQyyZjaUrqD`_P2+D zy#}HJiP&($uLqTE3w5qDn|CYFMomMg(wRUa?U~qP7chw86LnN-n;TkD=2T67Q5+bYjf3;OgHz$+TSLv-_$4K$*7+0 zR(DTN#*;C1otn_I8Fe}}rDn3JNi{pJt1)dtZ@1Hh!uMT6GD6>h-`nsjgOD)=(L|BD zG*|QsLM~u>y10Uz!}M&48^1>4t$Z;mUUx7_m=sFh|QWvK|bR% zmCVFrNj<8@lUYP;@_mg#5Nl>UmCm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Rg;7Kzncb4xhe+7zl6y#^6H@!Q)%F2PHQz(FLI`^S`3l z3E{F!qG?3J`J_ZINc56Ki-?48E0$28cM%ESKS}hVL`~@QV(>|9wVSyr<2&fY$q1x#xTIxTP}O#CArukPbE->7XIX<@v}K cEC289WLF{|$G=kNd)#dMhW*tSH++Nq7vM2MwEzGB diff --git a/build/test/out/test_casualQuiz.out b/build/test/out/test_casualQuiz.out index 140b4b5fda148654f2eaab65f1def9208fe787e8..102e959aac16328c2ec7c19b77b9752867ea4619 100755 GIT binary patch delta 5310 zcmZu#3s_V~mabFXw`t_jyye{uK0u>@8a2u)4G6Xd5uYogJX&ZP2=Z(KG9n~OCJquC zYbK>xqnJeFgG979wwiH*lZcaKvO#B)aWiHE+121OSs%$pC;AO@>fQ^Q`L@6BR-OOU ze@>k`=iKUsYiB*Ko%L|OsEN+(>ug`9IXahi{<&Tvm=4rnN_>?8+;u3$+N=SRa4!@z#^9ZrD2mkXZj$S0NbZ;xJlWq5* z-hgN`+pdf8w+jy0AvL@wQ$kzWY28Zro_TsCz(w|yM+3aYdOYT|yf9|#ebz__88WUX zWH<%=RLCoBz4h@33J_c(fCL1)5mqonDwxd>`95>v)Z zCaESiG{Lh-I>eUxv{(nt9RHwyx>wDme7QK@TYNA$)Z)f^S=%Ylsa zql;ShXZ;-bm<4#&OxdyJu{d`=4t6~bVz;=uJ^w{xks8GwYeFqMa`fo(hXxs%5SkEv zBSUk%r6UIrUKMahj!4HRLcC=5!>G|-`Yqe#69#Xvqdsx4g9t`b891q1t||8DeG60jR? zvcKZEmhBAO1W&tu4E%CBY+_ea-}7CnA;fSx;~tiyLrP|c(k4S9`$O7F7-YuuR4lSJ zJrUYiCysgS0*p|9nurYsL@i(9!p2C5oHVX zj|`mkz}2DcCWIZ*+4(r_xG?mViOt9eUjX%CsC-#fZbQx)(I+?KaeQo{92agH6rEEg zua!Og6O}!rsLE+$9xkIB^f0;*C_J1|bY_)2!k){Bn4_r=LEg|jC9cn~kL3`Cn^8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Q45WEnua*2c&)Ig+O zT-tIi!`zl|%_^*Y5x-J}x$ok6)$k+Ubt`MIAjN!34VI^qcOlY?TRlYbqm~LxNwj?2 zNwru6y9|6ebs{Zo%2MNtn3jQPpRpcd0c^hH%@7CB>RYk}XWA3PE4RX@)M}C)ZP*5l z{J~s2zHU4GJ03#H+1c&TLkEKRFBKHrN1GKKU?g9A|xsw=4pAV@6sQqo$dkKa9=VW8`-Z!)riz z)!UGV?fJ*Ip&^tQN75Zp;=)<|4ra^F-@%D?8u{1nKzykAsf{x6-_cm8U%_EKq|L(1NEnIffCM`J!XkJJ`l&kHNF( #include #include +#include #include "casualQuiz.h" @@ -51,7 +52,7 @@ bool activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], in richtig = false; FzeigeFragen(fragen, i); FzeigeAntworten(antworten, i); - printf("Please type in your answer 1,2,3 or 4: "); + printf("Reminder: Typing 0 lets you stop the game.\nPlease type in your answer 1,2,3 or 4: "); eingabe = FEingabeInteger(); richtig = FcheckaufRichtigkeit(eingabe, richtige_antwort, i); FzaehlernachAuswahl(richtig, answeredP, correctP); @@ -76,6 +77,10 @@ int FEingabeInteger() { } bool FcheckaufRichtigkeit(int eingabe, int richtige_antwort[], int i) { switch (eingabe) { + case 0:{ + exit(7); + break; + } case 1: { printf("Case 1\n"); if (richtige_antwort[i] == 1) {