added 3 things: min 2 max 8 options in quetion, the quetion and awnser in the host panle too, clour coded and symbol for awnsers.
This commit is contained in:
parent
2a4102438a
commit
ad959266a5
24 changed files with 259 additions and 45 deletions
|
@ -2,6 +2,8 @@ import { createGame } from "./InsertGameInDB.js";
|
|||
import { questions } from "./GameCreateData.svelte.js";
|
||||
|
||||
export async function startGame() {
|
||||
|
||||
|
||||
if (questions.v.some((q) => q.name === "")) return alert("Please fill all questions");
|
||||
if (questions.v.some((q) => q.answers.some((a) => a === ""))) return alert("Fill all options");
|
||||
if (questions.v.some((q) => q.correctAnswer === undefined))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue