From 4eea3569c9c95223afc7d296a95c3806234fb2f1 Mon Sep 17 00:00:00 2001 From: fdai7467 Date: Fri, 3 Feb 2023 14:24:34 +0100 Subject: [PATCH] =?UTF-8?q?Fragen=201-3=20f=C3=BCr=20Kategorie=20Rechnen?= =?UTF-8?q?=20Level=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 3978963..ada457f 100644 --- a/src/main.c +++ b/src/main.c @@ -446,11 +446,34 @@ int main() } }; - Category categories[4] = {fussball, kunst,}; + Question rechnenQst1 = {.question = "35 + 47", .answer = "82"}; + Question rechnenQst2 = {.question = "86 + 59", .answer = "145"}; + Question rechnenQst3= {.question = "24 + 38", .answer = "62"}; + + Level rechnenlevel1 = + { + .questions = + { + rechnenQst1, rechnenQst2, rechnenQst3, + }, + .size = 3 + }; + + Category rechnen = + { + .size = 1, // size = Anzahl Level + .name = "Kopfrechnen", + .lvlQuestions = + { + rechnenlevel1, + } + }; + + Category categories[4] = {fussball, kunst, rechnen}; printf("Willkommen beim Quiz-Spiel! Beantworten Sie die folgenden Fragen:\n"); - int catCount = 2; // anzahl an kategorien + int catCount = 3; // anzahl an kategorien char input[256]; startGame(catCount, input, categories);