From bb072b154c41944d6219ac88d3f116bb76395db6 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 16:36:07 +0100 Subject: [PATCH 01/23] 1st functional commit --- src/wwm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wwm.c b/src/wwm.c index e69de29..3a5e5a7 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -0,0 +1,9 @@ +#include +#include +#include "wwm.h" + +void wwm(){ + printf("Welcome to ´Who wants to be a millionaire?´ \n"); + return; + +} From cc3f3de54be7fe3e8c3b9f4ebbc013d4b8fb0b5f Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 16:40:29 +0100 Subject: [PATCH 02/23] 2nd functional commit --- src/wwm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 3a5e5a7..fca11ed 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -2,8 +2,14 @@ #include #include "wwm.h" +int runde = 0; +int geld = 0; +int aktuellGeld = 0; + void wwm(){ printf("Welcome to ´Who wants to be a millionaire?´ \n"); - return; + printf("You are at stage %d and have %d $\n", runde, geld); + +return; } From 3d22c908d86efab05a7f1d0b957ae5fc2b5a86bd Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 16:45:53 +0100 Subject: [PATCH 03/23] 3rd functional commit --- src/wwm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index fca11ed..10dd33b 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -10,6 +10,12 @@ void wwm(){ printf("Welcome to ´Who wants to be a millionaire?´ \n"); printf("You are at stage %d and have %d $\n", runde, geld); -return; + const char* question[] = { + "Which planet is known as the `blue planet`?", + "What is the capital of Germany?", + "What is the largest desert in the world?" + }; + + return; } From 3c85f0f767cf1ef022afc46eeddbbb28ef1baab0 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 16:46:47 +0100 Subject: [PATCH 04/23] 4th functional commit --- src/wwm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wwm.c b/src/wwm.c index 10dd33b..d3f211c 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -16,6 +16,12 @@ void wwm(){ "What is the largest desert in the world?" }; + const char* answers[][4] = { + {"Mars", "Venus", "Earth", "Jupiter"}, + {"Munich", "Berlin", "Cologne", "Frankfurt am Main"}, + {"Antarctica", "Sahara", "Gobi", "Arctica" } + }; + return; } From 6084e274d16da59ab99e9e104e345fad067b84bd Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 16:47:38 +0100 Subject: [PATCH 05/23] 5th functional commit --- src/wwm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wwm.c b/src/wwm.c index d3f211c..10c1708 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -22,6 +22,10 @@ void wwm(){ {"Antarctica", "Sahara", "Gobi", "Arctica" } }; + int correctAnswer[] = { + 3, 2, 1 + }; + return; } From 5b0b6cbc5d89ed2f37288ac90d4e714dacfaea8f Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 16:49:53 +0100 Subject: [PATCH 06/23] 6th functional commit --- src/wwm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wwm.c b/src/wwm.c index 10c1708..1a5496b 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -1,3 +1,4 @@ +#include #include #include #include "wwm.h" @@ -26,6 +27,10 @@ void wwm(){ 3, 2, 1 }; + + srand(time(0)); + int frage = rand() % 5; + return; } From fe4b51720800d44732b634a3a2671e4d57b413c6 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 16:55:32 +0100 Subject: [PATCH 07/23] 7th functional commit --- src/wwm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wwm.c b/src/wwm.c index 1a5496b..0968318 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -31,6 +31,12 @@ void wwm(){ srand(time(0)); int frage = rand() % 5; + + printf("Question %d: %s\n", runde + 1, question[frage]); + + for (int i = 0; i < 4; i++) { + printf("%d. %s \n", i + 1, answers[frage][i]); + return; } From d7c9c601af98cf6522464e08fc35af433f4b21b9 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Sun, 4 Feb 2024 17:01:56 +0100 Subject: [PATCH 08/23] 8th functional commit --- src/wwm.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/wwm.c b/src/wwm.c index 0968318..2ed9873 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -12,19 +12,19 @@ void wwm(){ printf("You are at stage %d and have %d $\n", runde, geld); const char* question[] = { - "Which planet is known as the `blue planet`?", - "What is the capital of Germany?", - "What is the largest desert in the world?" + "Which planet is known as the `blue planet`?", + "What is the capital of Germany?", + "What is the largest desert in the world?" }; const char* answers[][4] = { - {"Mars", "Venus", "Earth", "Jupiter"}, - {"Munich", "Berlin", "Cologne", "Frankfurt am Main"}, - {"Antarctica", "Sahara", "Gobi", "Arctica" } + {"Mars", "Venus", "Earth", "Jupiter"}, + {"Munich", "Berlin", "Cologne", "Frankfurt am Main"}, + {"Antarctica", "Sahara", "Gobi", "Arctica" } }; int correctAnswer[] = { - 3, 2, 1 + 3, 2, 1 }; @@ -37,6 +37,19 @@ void wwm(){ for (int i = 0; i < 4; i++) { printf("%d. %s \n", i + 1, answers[frage][i]); + int useranswer; + printf("Your answer (1-4):"); + scanf("%d", &useranswer); + + + if (useranswer == correctAnswer[frage]) { + printf("That is correct!"); + } + else { + printf("That is wrong!"); + } + + return; } From eeacb5a3debd049f04fbcec24d3bfcc9c62ba353 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 17:55:08 +0100 Subject: [PATCH 09/23] refactoring 1: Entfernen ungenutzter Variable --- src/wwm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 2ed9873..31c819a 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -5,7 +5,6 @@ int runde = 0; int geld = 0; -int aktuellGeld = 0; void wwm(){ printf("Welcome to ´Who wants to be a millionaire?´ \n"); From 318e68a75e9f82e1a72541b2f86c59cd7daa4bc5 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 18:20:05 +0100 Subject: [PATCH 10/23] =?UTF-8?q?functional=209:=20for-Schleife=20f=C3=BCr?= =?UTF-8?q?=2015=20Fragen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wwm.c | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/wwm.c b/src/wwm.c index 31c819a..0d1d61d 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -5,6 +5,7 @@ int runde = 0; int geld = 0; +int frage = 0; void wwm(){ printf("Welcome to ´Who wants to be a millionaire?´ \n"); @@ -13,42 +14,46 @@ void wwm(){ const char* question[] = { "Which planet is known as the `blue planet`?", "What is the capital of Germany?", - "What is the largest desert in the world?" + "What is the largest desert in the world?", + "In which country would you find the Great Wall?", + "How many meters are in a kilometer?" }; const char* answers[][4] = { {"Mars", "Venus", "Earth", "Jupiter"}, {"Munich", "Berlin", "Cologne", "Frankfurt am Main"}, - {"Antarctica", "Sahara", "Gobi", "Arctica" } + {"Antarctica", "Sahara", "Gobi", "Arctica" }, + {"USA", "China", "Russia", "Japan"}, + {"100", "10", "1", "1000"} }; int correctAnswer[] = { - 3, 2, 1 + 3, 2, 1, 2, 4 }; - srand(time(0)); - int frage = rand() % 5; + for (r = 1; r <= 15; r++){ + srand(time(0)); + int frage = rand() % 5; + printf("Question %d: %s\n", runde + 1, question[frage]); + for (int i = 0; i < 4; i++) { + printf("%d. %s \n", i + 1, answers[frage][i]); - printf("Question %d: %s\n", runde + 1, question[frage]); + int useranswer; + printf("Your answer (1-4):"); + scanf("%d", &useranswer); - for (int i = 0; i < 4; i++) { - printf("%d. %s \n", i + 1, answers[frage][i]); - int useranswer; - printf("Your answer (1-4):"); - scanf("%d", &useranswer); - - - if (useranswer == correctAnswer[frage]) { - printf("That is correct!"); - } - else { - printf("That is wrong!"); + if (useranswer == correctAnswer[frage]) { + printf("That is correct!"); + runde++; + } + else { + printf("That is wrong!"); + } } - - return; + return; } From 28d82c12e6c06adb301da7e5c0f9f1c3633ecc2d Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 18:22:41 +0100 Subject: [PATCH 11/23] =?UTF-8?q?refactoring=202:=20neue=20Zeile=20nach=20?= =?UTF-8?q?Ausgabe=20richtig/falsch=20und=20=C3=84nderung=20Ausgabe=20fals?= =?UTF-8?q?ch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wwm.c b/src/wwm.c index 0d1d61d..f57d93f 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -46,11 +46,11 @@ void wwm(){ if (useranswer == correctAnswer[frage]) { - printf("That is correct!"); + printf("That is correct!\n"); runde++; } else { - printf("That is wrong!"); + printf("What a shame! That is wrong!\n"); } } From 58a91c27663722c38db67e4b8c714888c4725af9 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 18:29:20 +0100 Subject: [PATCH 12/23] =?UTF-8?q?refactoring=203:=20Ausgabe=20in=20for-Sch?= =?UTF-8?q?leife=20versetzt=20und=20=20Variable=20au=C3=9Ferhalb=20Funktio?= =?UTF-8?q?n=20initialisiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wwm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wwm.c b/src/wwm.c index f57d93f..a8a0091 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -6,6 +6,7 @@ int runde = 0; int geld = 0; int frage = 0; +int useranswer; void wwm(){ printf("Welcome to ´Who wants to be a millionaire?´ \n"); @@ -33,6 +34,7 @@ void wwm(){ for (r = 1; r <= 15; r++){ + printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); int frage = rand() % 5; printf("Question %d: %s\n", runde + 1, question[frage]); From 2ae4e8d7009fe78c58915157245accba12f23d52 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 18:35:03 +0100 Subject: [PATCH 13/23] =?UTF-8?q?functional=2010:=20Implementierung=20Geld?= =?UTF-8?q?betr=C3=A4ge=20iund=20steigen=20mit=20Runde?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wwm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index a8a0091..611946c 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -8,9 +8,16 @@ int geld = 0; int frage = 0; int useranswer; +int setGeld(int runde){ + int Geldstufen[] = {0, 100, 200, 300, 500, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 125000, 250000, 500000, 1000000}; + geld = Geldstufen[runde]; + return geld; +} + + void wwm(){ + printf("Welcome to ´Who wants to be a millionaire?´ \n"); - printf("You are at stage %d and have %d $\n", runde, geld); const char* question[] = { "Which planet is known as the `blue planet`?", @@ -50,6 +57,7 @@ void wwm(){ if (useranswer == correctAnswer[frage]) { printf("That is correct!\n"); runde++; + setGeld(runde); } else { printf("What a shame! That is wrong!\n"); From 3988a6b585ea6cf785033c4ab1f32bd4b26cccd6 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 18:39:51 +0100 Subject: [PATCH 14/23] functional 11: setGeld() in Headerfile --- src/wwm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wwm.h b/src/wwm.h index 48ea4a9..b38a849 100644 --- a/src/wwm.h +++ b/src/wwm.h @@ -1,6 +1,10 @@ #ifndef WWM_H #define WWM_H +extern int Geldstufen[]; + +int setGeld(int runde); + void wwm(); #endif // ende WWM_H From 490a3411705e27b10a0d7aabd0c82de0696c1d83 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 19:01:27 +0100 Subject: [PATCH 15/23] refactoring 4: Anpassungen in Header und Programm --- src/wwm.c | 3 ++- src/wwm.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 611946c..1d7c0d8 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -40,7 +40,7 @@ void wwm(){ }; - for (r = 1; r <= 15; r++){ + for (int r = 1; r <= 15; r++){ printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); int frage = rand() % 5; @@ -66,4 +66,5 @@ void wwm(){ return; + } } diff --git a/src/wwm.h b/src/wwm.h index b38a849..edddd39 100644 --- a/src/wwm.h +++ b/src/wwm.h @@ -1,6 +1,11 @@ #ifndef WWM_H #define WWM_H +extern int runde; +extern int geld; +extern int frage; +extern int useranswer; + extern int Geldstufen[]; int setGeld(int runde); From d252b26bcec8ca245d5b9cfa55c2411937d1aa47 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 19:54:50 +0100 Subject: [PATCH 16/23] unittest 1: Erster Test compile --- test/test_wwm.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/test/test_wwm.c b/test/test_wwm.c index e69de29..a9ec536 100644 --- a/test/test_wwm.c +++ b/test/test_wwm.c @@ -0,0 +1,29 @@ +// test_wwm.c + +#include "unity.h" +#include "wwm.h" + +void setUp(void) { + // set up any initializations if needed +} + +void tearDown(void) { + // clean up after the test if needed +} + +void test_setGeld_and_wwm(void) { + // Initialize or reset variables if needed + runde = 0; + geld = 0; + frage = 0; + useranswer = 0; + + // Call setGeld and check the initial values + TEST_ASSERT_EQUAL(0, setGeld(0)); + TEST_ASSERT_EQUAL(0, geld); + + + // Call wwm and check if it runs without errors + //wwm(); + +} From 186b85d298e76ffc29eee3fad37a2d445290e55d Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:04:18 +0100 Subject: [PATCH 17/23] unittest 2: setGeld()-Test --- test/test_wwm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/test/test_wwm.c b/test/test_wwm.c index a9ec536..4a644d5 100644 --- a/test/test_wwm.c +++ b/test/test_wwm.c @@ -11,7 +11,7 @@ void tearDown(void) { // clean up after the test if needed } -void test_setGeld_and_wwm(void) { +void test_setGeld_1(void) { // Initialize or reset variables if needed runde = 0; geld = 0; @@ -19,11 +19,16 @@ void test_setGeld_and_wwm(void) { useranswer = 0; // Call setGeld and check the initial values - TEST_ASSERT_EQUAL(0, setGeld(0)); - TEST_ASSERT_EQUAL(0, geld); - + TEST_ASSERT_EQUAL(100, setGeld(1)); + TEST_ASSERT_EQUAL(100, geld); + +} + +void test_setGeld_2(void) { + + runde = 0; + + TEST_ASSERT_EQUAL(300, setGeld(3)); - // Call wwm and check if it runs without errors - //wwm(); } From a8a92e778aeecc214cbfa9a837659ea8660f717f Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:07:55 +0100 Subject: [PATCH 18/23] functional 12: Erweiterung Fragenpool, Anpassung rand(), Anzeige verlorenes Geld bei lose --- src/wwm.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/wwm.c b/src/wwm.c index 1d7c0d8..945636c 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -24,7 +24,12 @@ void wwm(){ "What is the capital of Germany?", "What is the largest desert in the world?", "In which country would you find the Great Wall?", - "How many meters are in a kilometer?" + "How many meters are in a kilometer?", + "How many colors are there in a rainbow?", + "What is the square root of 25?", + "Who painted the Mona Lisa?", + "What is the largest ocean on earth?", + "What is the largest planet in our solar system?" }; const char* answers[][4] = { @@ -32,7 +37,12 @@ void wwm(){ {"Munich", "Berlin", "Cologne", "Frankfurt am Main"}, {"Antarctica", "Sahara", "Gobi", "Arctica" }, {"USA", "China", "Russia", "Japan"}, - {"100", "10", "1", "1000"} + {"100", "10", "1", "1000"}, + {"6", "7", "8", "9"}, + {"5", "25", "20", "10"}, + {"Vincent van Gogh", "Pablo Picasso", "Leonardo da Vinci", "Michelangelo"}, + {"Pacific Ocean", "Atlantic Ocean", "Arctic Ocean", "Indian Ocean"}, + {"Merkur", "Jupiter", "Neptun", "Pluto"} }; int correctAnswer[] = { @@ -43,7 +53,7 @@ void wwm(){ for (int r = 1; r <= 15; r++){ printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); - int frage = rand() % 5; + int frage = rand() % 10; printf("Question %d: %s\n", runde + 1, question[frage]); for (int i = 0; i < 4; i++) { @@ -60,7 +70,7 @@ void wwm(){ setGeld(runde); } else { - printf("What a shame! That is wrong!\n"); + printf("What a shame! That is wrong!\n You lost %d $", geld); } } From 7826b0aa77e7c8216148684f9f58129b031acff2 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:24:37 +0100 Subject: [PATCH 19/23] functional 13: Ende nach 15 Runden extra Ausgabe --- src/wwm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 945636c..9e4b0bf 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -50,7 +50,14 @@ void wwm(){ }; - for (int r = 1; r <= 15; r++){ + for (int r = 1; r <= 16; r++){ + if (r == 16) { + printf("Congratulations ! You have won 1.000.000 $"); + return; + } + + + printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); int frage = rand() % 10; From 2ce2cf93b8bcc63a0013efe11d2b7ad08a2444f5 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:26:17 +0100 Subject: [PATCH 20/23] refactoring 5: Trennung nach jeder Frage --- src/wwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index 9e4b0bf..eb70582 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -57,7 +57,7 @@ void wwm(){ } - + printf("__________________________________________________ \n\n"); printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); int frage = rand() % 10; From bc2395c19fd884f27a844dd4d34f2dd29cd54bac Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:39:26 +0100 Subject: [PATCH 21/23] =?UTF-8?q?functional=2014:=20Auslagerung=20int=20f?= =?UTF-8?q?=C3=BCr=20Frage=20crandomNumber()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wwm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/wwm.c b/src/wwm.c index eb70582..c8f8e77 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -15,6 +15,15 @@ int setGeld(int runde){ } +int crandomNumber() { + srand(time(NULL)); + frage = rand() % 10; + return frage; + +} + + + void wwm(){ printf("Welcome to ´Who wants to be a millionaire?´ \n"); @@ -60,7 +69,7 @@ void wwm(){ printf("__________________________________________________ \n\n"); printf("You are at stage %d and have %d $\n", runde, geld); srand(time(0)); - int frage = rand() % 10; + crandomNumber(); printf("Question %d: %s\n", runde + 1, question[frage]); for (int i = 0; i < 4; i++) { From ed0d4d075858ddf5b55c65c43757056617c67242 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 20:49:06 +0100 Subject: [PATCH 22/23] unittest 3: crandomNumber() --- test/test_wwm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_wwm.c b/test/test_wwm.c index 4a644d5..85a87b1 100644 --- a/test/test_wwm.c +++ b/test/test_wwm.c @@ -32,3 +32,9 @@ void test_setGeld_2(void) { } + +void test_crandomNumber(void){ + int result = crandomNumber(); + TEST_ASSERT_TRUE(result >= 0 && result <= 9); + +} From baa30248c669c441724c26e33367e4aecf95c001 Mon Sep 17 00:00:00 2001 From: Christian Reum Date: Mon, 5 Feb 2024 22:24:53 +0100 Subject: [PATCH 23/23] merge commit --- src/wwm.c | 1 + src/wwm.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/wwm.c b/src/wwm.c index c8f8e77..c0c2f99 100644 --- a/src/wwm.c +++ b/src/wwm.c @@ -7,6 +7,7 @@ int runde = 0; int geld = 0; int frage = 0; int useranswer; +int test; int setGeld(int runde){ int Geldstufen[] = {0, 100, 200, 300, 500, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 125000, 250000, 500000, 1000000}; diff --git a/src/wwm.h b/src/wwm.h index edddd39..104550c 100644 --- a/src/wwm.h +++ b/src/wwm.h @@ -8,6 +8,8 @@ extern int useranswer; extern int Geldstufen[]; +int crandomNumber(); + int setGeld(int runde); void wwm();