Added Audio Questions
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
isMultipleChoiceQuestion,
|
||||
isSimpleQuestion,
|
||||
isImageQuestion,
|
||||
type Game
|
||||
type Game,
|
||||
isAudioQuestion,
|
||||
isAudioMultipleChoiceQuestion
|
||||
} from "$lib/games/games";
|
||||
import ws from "$lib/websocket.svelte";
|
||||
import { page } from "$app/state";
|
||||
@@ -18,6 +20,8 @@
|
||||
import type { VisitedQuestions } from "$lib/Types.js";
|
||||
import MultipleChoiceQuestionComponent from "$lib/MultipleChoiceQuestionComponent.svelte";
|
||||
import ImageQuestionComponent from "$lib/ImageQuestionComponent.svelte";
|
||||
import AudioQuestionComponent from "$lib/AudioQuestionComponent.svelte";
|
||||
import AudioMultipleChoiceQuestionComponent from "$lib/AudioMultipleChoiceQuestionComponent.svelte";
|
||||
|
||||
let startDisabled = $state(true);
|
||||
|
||||
@@ -366,6 +370,20 @@
|
||||
showQuestion={true}
|
||||
isBuzzed={false}
|
||||
/>
|
||||
{:else if isAudioQuestion(gameManager.question)}
|
||||
<AudioQuestionComponent
|
||||
question={gameManager.question}
|
||||
showAnswer={true}
|
||||
showPlayer={true}
|
||||
showQuestion={true}
|
||||
/>
|
||||
{:else if isAudioMultipleChoiceQuestion(gameManager.question)}
|
||||
<AudioMultipleChoiceQuestionComponent
|
||||
question={gameManager.question}
|
||||
showAnswer={true}
|
||||
showPlayer={true}
|
||||
showQuestion={true}
|
||||
/>
|
||||
{:else}
|
||||
<p>Type of question unknown</p>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user