MVP #5 #68
|
@ -1,12 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Layout from '../Components/Layout.svelte'
|
import Layout from '../Components/Layout.svelte'
|
||||||
import Input from '../../../lib/components/Inputs/Input.svelte'
|
|
||||||
import { checkPoint } from '$lib/TStypes/experiences'
|
import { checkPoint } from '$lib/TStypes/experiences'
|
||||||
import { answer } from '$lib/utils/database/game'
|
|
||||||
|
|
||||||
export let data: { name: string; checkPoint: checkPoint }
|
export let data: { name: string; checkPoint: checkPoint }
|
||||||
const { checkPoint, name } = data
|
const { checkPoint, name } = data
|
||||||
let myAnswer = ''
|
|
||||||
|
|
||||||
export let nextQuestion
|
export let nextQuestion
|
||||||
</script>
|
</script>
|
||||||
|
@ -16,7 +13,6 @@
|
||||||
control={'not-control'}
|
control={'not-control'}
|
||||||
nextQuestion={() => {
|
nextQuestion={() => {
|
||||||
nextQuestion()
|
nextQuestion()
|
||||||
myAnswer = ''
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span slot="title">{name}</span>
|
<span slot="title">{name}</span>
|
||||||
|
|
|
@ -41,7 +41,9 @@
|
||||||
|
|
||||||
const nextQuestion = () => {
|
const nextQuestion = () => {
|
||||||
//další otázka
|
//další otázka
|
||||||
if (control !== null) {
|
|
||||||
|
console.log({ control })
|
||||||
|
|
||||||
control = null
|
control = null
|
||||||
if (clientAnswers.pos === clientAnswers.end) view = 'end'
|
if (clientAnswers.pos === clientAnswers.end) view = 'end'
|
||||||
else {
|
else {
|
||||||
|
@ -49,7 +51,6 @@
|
||||||
view = 'map'
|
view = 'map'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//let answers
|
//let answers
|
||||||
//$: if (clientAnswers.pos < clientAnswers.end) answers = parseQuestion(gameData.questions[clientAnswers.pos].answer, gameData.questions[clientAnswers.pos].type) //delete
|
//$: if (clientAnswers.pos < clientAnswers.end) answers = parseQuestion(gameData.questions[clientAnswers.pos].answer, gameData.questions[clientAnswers.pos].type) //delete
|
||||||
|
|
Loading…
Reference in New Issue