From f8e186d16e66067be59135c144e4d27b5449cce4 Mon Sep 17 00:00:00 2001 From: Jonas Kappa Date: Thu, 11 Sep 2025 14:55:31 +0200 Subject: [PATCH] Little design fixes --- .../MultipleChoiceQuestionComponent.svelte | 2 +- src/lib/SimpleQuestionComponent.svelte | 4 +- src/lib/Wall.svelte | 2 +- src/lib/games/games.ts | 281 ++++++++++++++++++ .../connected/games/[game]/+page.svelte | 11 +- 5 files changed, 293 insertions(+), 7 deletions(-) diff --git a/src/lib/MultipleChoiceQuestionComponent.svelte b/src/lib/MultipleChoiceQuestionComponent.svelte index 33bde6b..800053e 100644 --- a/src/lib/MultipleChoiceQuestionComponent.svelte +++ b/src/lib/MultipleChoiceQuestionComponent.svelte @@ -33,7 +33,7 @@
{#if showQuestion}
-
{question.data.question}
+
{question.data.question}
{#each _choices as choice} diff --git a/src/lib/SimpleQuestionComponent.svelte b/src/lib/SimpleQuestionComponent.svelte index 04e0f2d..80ecbbf 100644 --- a/src/lib/SimpleQuestionComponent.svelte +++ b/src/lib/SimpleQuestionComponent.svelte @@ -14,11 +14,11 @@
{#if showQuestion || showAnswer}
-
{question.data.question}
+
{question.data.question}
{/if} {#if showAnswer} -
+
{question.data.answer}
{/if} diff --git a/src/lib/Wall.svelte b/src/lib/Wall.svelte index 29573ea..63a1f2d 100644 --- a/src/lib/Wall.svelte +++ b/src/lib/Wall.svelte @@ -33,7 +33,7 @@ if (onclick) onclick(catIndex, queIndex); }} > -
{question.points}
+
{question.points}
{/each} {/each} diff --git a/src/lib/games/games.ts b/src/lib/games/games.ts index 6d8884f..49d7248 100644 --- a/src/lib/games/games.ts +++ b/src/lib/games/games.ts @@ -938,6 +938,287 @@ const games: Games = [ ] } ] + }, + { + name: "Ich gehe zur Schule", + walls: [ + { + name: "Schulfächer", + categories: [ + { + name: "Deutsch", + questions: [ + { + type: "SIMPLE", + points: 100, + data: { + question: "Wie viele Fälle gibt es in der deutschen Sprache?", + answer: "4" + } + }, + { + type: "MULTIPLE_CHOICE", + points: 200, + data: { + question: + "Mein Sohn, was birgst du so bang dein Gesicht? - Wie geht es weiter?", + choices: [ + "Siehst, Vater, du den Erlkönig nicht?", + "Was Erlkönig mir leise verspricht?", + "Mein Vater, mein Vater, und hörest du nicht,", + "Den Erlkönig mit Kron und Schweif?" + ] + } + }, + { + type: "SIMPLE", + points: 300, + data: { + question: 'Bilde das Futur II Passiv von "Ich frage ihn."', + answer: "Er wird von mir gefragt worden sein." + } + }, + { + type: "SIMPLE", + points: 400, + data: { + question: + 'Bilde das Plusquamperfekt Passiv von "Ich frage ihn."', + answer: "Er war von mir gefragt worden." + } + }, + { + type: "MULTIPLE_CHOICE", + points: 500, + data: { + question: "Welche Szene gibt es nicht in Faust", + choices: [ + "Abend. Offen Feld", + "Nacht", + "Abend", + "Nacht. Offen Feld" + ] + } + } + ] + }, + { + name: "Biologie", + questions: [ + { + type: "SIMPLE", + points: 100, + data: { + question: + "Welches Tierchen kann man sich über die Füße ziehen?", + answer: "Pantoffeltierchen" + } + }, + { + type: "SIMPLE", + points: 200, + data: { + question: "Welches ist das größte Säugetier an Land?", + answer: "Afrikanischer Elefant" + } + }, + { + type: "SIMPLE", + points: 0, + data: { + question: "Frage 3", + answer: "Antwort 3" + } + }, + { + type: "MULTIPLE_CHOICE", + points: 400, + data: { + question: + "Welche der folgenden Pflanzen betreibt keine Photosynthese (und existiert)?", + choices: [ + "Fichtenspargel", + "Buchenmöhre", + "Eichensellerie", + "Erlenrübe" + ] + } + }, + { + type: "SIMPLE", + points: 0, + data: { + question: "Frage 5", + answer: "Antwort 5" + } + } + ] + }, + { + name: "Religion", + questions: [ + { + type: "SIMPLE", + points: 100, + data: { + question: "Nenne die 5 größten Religionen.", + answer: "Christentum, Judentum, Islam, Hinduismus, Buddhismus" + } + }, + { + type: "MULTIPLE_CHOICE", + points: 200, + data: { + question: + "In welchem Jahrhundert wurde der Buddhismus gegründet?", + choices: ["6. v. Chr", "3. n. Chr", "12. v. Chr", "7. n. Chr"] + } + }, + { + type: "MULTIPLE_CHOICE", + points: 300, + data: { + question: "Welchen Gott gibt es nicht im Hinduismus?", + choices: [ + "Haathi", + "Skanda", + "Surya", + "Indra", + "Garuda", + "Kali", + "Durga", + "Hanuman" + ] + } + }, + { + type: "MULTIPLE_CHOICE", + points: 400, + data: { + question: "Welches ist keine der 5 Säulen des Islams?", + choices: ["Hubb", "Shahada", "Salah", "Zakat", "Sawm", "Hadsch"] + } + }, + { + type: "SIMPLE", + points: 500, + data: { + question: "Welche Abkürzung stand über dem Kreuz von Jesus?", + answer: "INRI" + } + } + ] + }, + { + name: "Mathematik", + questions: [ + { + type: "SIMPLE", + points: 100, + data: { + question: "Was ist das Ergebnis von 2 + 2 * 4?", + answer: "10" + } + }, + { + type: "SIMPLE", + points: 200, + data: { + question: "Wer wird als Vater der Geometrie bezeichnet?", + answer: "Euklid von Alexandria" + } + }, + { + type: "SIMPLE", + points: 300, + data: { + question: + "Wie werden die drei Seiten eines rechtwinkligen Dreiecks genannt?", + answer: "Hypotenuse, Ankathete, Gegenkathete" + } + }, + { + type: "MULTIPLE_CHOICE", + points: 400, + data: { + question: "Welche der Aantworten stellt PI am besten dar?", + choices: [ + "3,141592653589", + "3,141522653589", + "3,142592653589", + "3,141592657589", + "3,141562653589" + ] + } + }, + { + type: "SIMPLE", + points: 500, + data: { + question: "(6 + 58 * 0,4 * 5 - 2) / 5!", + answer: "1" + } + } + ] + }, + { + name: "Sport", + questions: [ + { + type: "SIMPLE", + points: 100, + data: { + question: + "Wie viele Berührungen sind beim Volleyball in der eigenen Hälfte erlaubt?", + answer: "3" + } + }, + { + type: "SIMPLE", + points: 200, + data: { + question: + "Wie viele Schritte darf man mit einem Basketball machen ohne zu prellen?", + answer: "2" + } + }, + { + type: "MULTIPLE_CHOICE", + points: 300, + data: { + question: "Wie groß ist ein Handballfeld mit Sicherheitszone?", + choices: ["43m x 23m", "40m x 20m", "45m x 30m", "34m x 19m"] + } + }, + { + type: "SIMPLE", + points: 400, + data: { + question: + "Was ist der wichtigste Unterschied zwischen American Football und Rugby?", + answer: "Der Ball darf im Rugby nur nach hinten gepasst werden. Im Football sind alle Richtungen erlaubt." + } + }, + { + type: "MULTIPLE_CHOICE", + points: 500, + data: { + question: + "Wer hat die Snookerweltmeisterschaft in 2025 gewonnen?", + choices: [ + "Zhao Xintong", + "Mark Williams", + "Jackson Page", + "Lei Peifan", + "Xiao Guodong" + ] + } + } + ] + } + ] + } + ] } ]; diff --git a/src/routes/connected/games/[game]/+page.svelte b/src/routes/connected/games/[game]/+page.svelte index ed232e6..0aa65b8 100644 --- a/src/routes/connected/games/[game]/+page.svelte +++ b/src/routes/connected/games/[game]/+page.svelte @@ -206,6 +206,13 @@ goBack(): void { this.sendWall(); this.state = GameState.CHOOSING_QUESTION; + this.setupGoingBack(); + } + + setupGoingBack(): void { + this.answerIsShowing = false; + this.questionIsShowing = false; + this.pointsGivenForCurrentQuestion = false; } finishQuestion(): void { @@ -216,9 +223,7 @@ ) { this.visitedQuestions[this.currentCategory].push(this.currentQuestion); } - this.pointsGivenForCurrentQuestion = false; - this.answerIsShowing = false; - this.questionIsShowing = false; + this.setupGoingBack(); this.nextPlayer(); if (this.wallIsDone()) { this.goToNextWall();