attemptToSolveProblem

This commit is contained in:
Ota Prokopec 2023-03-08 19:27:13 +01:00
parent a4b9bbc543
commit f58aa9be32
2 changed files with 8 additions and 11 deletions

View File

@ -1,12 +1,9 @@
<script lang="ts">
import Layout from '../Components/Layout.svelte'
import Input from '../../../lib/components/Inputs/Input.svelte'
import { checkPoint } from '$lib/TStypes/experiences'
import { answer } from '$lib/utils/database/game'
export let data: { name: string; checkPoint: checkPoint }
const { checkPoint, name } = data
let myAnswer = ''
export let nextQuestion
</script>
@ -16,7 +13,6 @@
control={'not-control'}
nextQuestion={() => {
nextQuestion()
myAnswer = ''
}}
>
<span slot="title">{name}</span>

View File

@ -41,13 +41,14 @@
const nextQuestion = () => {
//další otázka
if (control !== null) {
control = null
if (clientAnswers.pos === clientAnswers.end) view = 'end'
else {
clientAnswers.pos++
view = 'map'
}
console.log({ control })
control = null
if (clientAnswers.pos === clientAnswers.end) view = 'end'
else {
clientAnswers.pos++
view = 'map'
}
}