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,13 +41,14 @@
|
||||||
|
|
||||||
const nextQuestion = () => {
|
const nextQuestion = () => {
|
||||||
//další otázka
|
//další otázka
|
||||||
if (control !== null) {
|
|
||||||
control = null
|
console.log({ control })
|
||||||
if (clientAnswers.pos === clientAnswers.end) view = 'end'
|
|
||||||
else {
|
control = null
|
||||||
clientAnswers.pos++
|
if (clientAnswers.pos === clientAnswers.end) view = 'end'
|
||||||
view = 'map'
|
else {
|
||||||
}
|
clientAnswers.pos++
|
||||||
|
view = 'map'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue