diff --git a/src/routes/explore/explore.svelte b/src/routes/explore/explore.svelte
index 62346d4..15cacf1 100644
--- a/src/routes/explore/explore.svelte
+++ b/src/routes/explore/explore.svelte
@@ -7,6 +7,7 @@
import Comparment from '../homepage/Components/Comparment.svelte'
let Search: string
+ //
diff --git a/src/routes/game/Forms/MultiChoiceForm.svelte b/src/routes/game/Forms/MultiChoiceForm.svelte
index 79258f4..c0b2263 100644
--- a/src/routes/game/Forms/MultiChoiceForm.svelte
+++ b/src/routes/game/Forms/MultiChoiceForm.svelte
@@ -10,7 +10,6 @@
export let control: 'wrong-firstTime' | 'wrong-secondTime' | 'correct' | 'not-control' | null
export let nextQuestion
- export let attempt: 1 | 2 = 1
const answerCheckBox = async () => {
const arr = checkPoint.CPOptions.filter((item, i) => {
@@ -18,9 +17,10 @@
})
const res = await answer(checkPoint.$id, arr)
if (res) control = 'correct'
- else if (attempt === 1) control = 'wrong-firstTime'
- else control = 'wrong-secondTime'
- attempt++
+ else if (control === null) {
+ control = 'wrong-firstTime'
+ myAnswers = new Array(checkPoint.CPOptions.length).fill(false) //nulling answers
+ } else control = 'wrong-secondTime'
}
diff --git a/src/routes/game/Forms/NumberForm.svelte b/src/routes/game/Forms/NumberForm.svelte
index f1bbba3..e4770bf 100644
--- a/src/routes/game/Forms/NumberForm.svelte
+++ b/src/routes/game/Forms/NumberForm.svelte
@@ -10,14 +10,14 @@
export let control: 'wrong-firstTime' | 'wrong-secondTime' | 'correct' | 'not-control' | null
export let nextQuestion
- export let attempt: 1 | 2 = 1
const answer_ = async () => {
const res = await answer(checkPoint.$id, myAnswer)
if (res) control = 'correct'
- else if (attempt === 1) control = 'wrong-firstTime'
- else control = 'wrong-secondTime'
- attempt++
+ else if (control === null) {
+ control = 'wrong-firstTime'
+ myAnswer = '' //nulling answer
+ } else control = 'wrong-secondTime'
}
diff --git a/src/routes/game/Forms/Renderer.svelte b/src/routes/game/Forms/Renderer.svelte
index c8b6abf..aa6b2aa 100644
--- a/src/routes/game/Forms/Renderer.svelte
+++ b/src/routes/game/Forms/Renderer.svelte
@@ -24,14 +24,13 @@
}
export let control: 'wrong-firstTime' | 'wrong-secondTime' | 'correct' | 'not-control' | null = null
- let view: 'question' | 'map' | 'end' = 'map'
+ let view: 'question' | 'map' | 'end' = 'question'
export let gameData: Experience //data
- $: console.log(client)
let client = {
//user data about game
- pos: 0,
+ pos: 1,
end: gameData.checkPoints.length - 1, //kolik otázek
points: 0, //body
possiblePointsToSeize: gameData.checkPoints.length * 2,
diff --git a/src/routes/game/Forms/SingleChoiceForm.svelte b/src/routes/game/Forms/SingleChoiceForm.svelte
index 6f69d82..ba3c2c3 100644
--- a/src/routes/game/Forms/SingleChoiceForm.svelte
+++ b/src/routes/game/Forms/SingleChoiceForm.svelte
@@ -10,14 +10,14 @@
export let control: 'wrong-firstTime' | 'wrong-secondTime' | 'correct' | 'not-control' | null
export let nextQuestion
- export let attempt: 1 | 2 = 1
const answer_ = async () => {
const res = await answer(checkPoint.$id, myAnswer)
if (res) control = 'correct'
- else if (attempt === 1) control = 'wrong-firstTime'
- else control = 'wrong-secondTime'
- attempt++
+ else if (control === null) {
+ control = 'wrong-firstTime'
+ myAnswer = ''
+ } else control = 'wrong-secondTime'
}
diff --git a/src/routes/game/Forms/TextForm.svelte b/src/routes/game/Forms/TextForm.svelte
index 9c8845a..db4ef6b 100644
--- a/src/routes/game/Forms/TextForm.svelte
+++ b/src/routes/game/Forms/TextForm.svelte
@@ -10,14 +10,12 @@
export let control: 'wrong-firstTime' | 'wrong-secondTime' | 'correct' | 'not-control' | null
export let nextQuestion
- export let attempt: 1 | 2 = 1
const answer_ = async () => {
const res = await answer(checkPoint.$id, myAnswer)
if (res) control = 'correct'
- else if (attempt === 1) control = 'wrong-firstTime'
+ else if (control === null) control = 'wrong-firstTime'
else control = 'wrong-secondTime'
- attempt++
}