From eb3e3f2ed9782084274141b3b83de0b86fbcdde7 Mon Sep 17 00:00:00 2001 From: Kevin Schellberg Date: Sun, 4 Feb 2024 19:04:10 +0100 Subject: [PATCH] Kategorie1 --- 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/quizduell.c | 6 ++++++ 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build/test/results/test_casualQuiz.pass b/build/test/results/test_casualQuiz.pass index 13ee44b..18ed9bf 100644 --- a/build/test/results/test_casualQuiz.pass +++ b/build/test/results/test_casualQuiz.pass @@ -11,4 +11,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.01628160000001344 +:time: 0.016070999999953983 diff --git a/build/test/results/test_quizduell.pass b/build/test/results/test_quizduell.pass index 23f27b6..ee16347 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.01820100000003322 +:time: 0.016301499999997304 diff --git a/build/test/results/test_timequiz.pass b/build/test/results/test_timequiz.pass index 2f5cd39..120ec59 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.015525200000013228 +:time: 0.016418199999975513 diff --git a/build/test/results/test_wwm.pass b/build/test/results/test_wwm.pass index cf54e1e..b54d492 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.016153500000029908 +:time: 0.016148299999997562 diff --git a/src/quizduell.c b/src/quizduell.c index d9a0556..668c436 100644 --- a/src/quizduell.c +++ b/src/quizduell.c @@ -19,6 +19,12 @@ QuizFrage erstelleFrage(const char* frage, const char* antwortA, const char* ant void quizduell() { printf("Welcome to the singleplayer quizduell!\n"); + Kategorie kategorien[MAX_CATEGORIES]; + kategorien[0].fragen = (QuizFrage*)malloc(MAX_QUESTIONS_PER_CATEGORY * sizeof(QuizFrage)); + kategorien[0].fragen[0] = erstelleFrage("Whats the height of the Zugspitze?", "2482 Meter", "2867 Meter", "2962 Meter", "3173 Meter", 'C'); + kategorien[0].anzahlFragen = MAX_QUESTIONS_PER_CATEGORY; + kategorien[0].joker = 1; + return; } \ No newline at end of file