Added Wall
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"useTabs": true,
|
||||
"singleQuote": true,
|
||||
"useTabs": false,
|
||||
"singleQuote": false,
|
||||
"trailingComma": "none",
|
||||
"printWidth": 100,
|
||||
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
|
||||
@@ -12,5 +12,6 @@
|
||||
}
|
||||
}
|
||||
],
|
||||
"tailwindStylesheet": "./src/app.css"
|
||||
"tailwindStylesheet": "./src/app.css",
|
||||
"tabWidth": 4
|
||||
}
|
||||
|
||||
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
|
||||
35
src/app.css
35
src/app.css
@@ -1 +1,34 @@
|
||||
@import 'tailwindcss';
|
||||
@import "tailwindcss";
|
||||
|
||||
@layer components {
|
||||
.btn {
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.inputField {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.card {
|
||||
border: 1px solid black;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: larger;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
16
src/app.html
16
src/app.html
@@ -1,19 +1,21 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html lang="en" class="h-full">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
|
||||
/>
|
||||
%sveltekit.head%
|
||||
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
<body data-sveltekit-preload-data="hover" class="size-full">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
|
||||
<script>
|
||||
const theme = new URL(window.location).searchParams.get('theme');
|
||||
const theme = new URL(window.location).searchParams.get("theme");
|
||||
|
||||
document.documentElement.classList.remove('light', 'dark');
|
||||
document.documentElement.classList.add('dark');
|
||||
document.documentElement.classList.remove("light", "dark");
|
||||
document.documentElement.classList.add("dark");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
973
src/lib/games/games.ts
Normal file
973
src/lib/games/games.ts
Normal file
@@ -0,0 +1,973 @@
|
||||
const games: Games = [
|
||||
{
|
||||
name: "LAN Party",
|
||||
walls: [
|
||||
{
|
||||
name: "Wall 1",
|
||||
categories: [
|
||||
{
|
||||
name: "Category 1",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 2",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 3",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 4",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 5",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Wall 2",
|
||||
categories: [
|
||||
{
|
||||
name: "Category 1",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 2",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 3",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 4",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 5",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "LAN Party 2",
|
||||
walls: [
|
||||
{
|
||||
name: "Wall 1",
|
||||
categories: [
|
||||
{
|
||||
name: "Category 1",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 2",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 3",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 4",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 5",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Wall 2",
|
||||
categories: [
|
||||
{
|
||||
name: "Category 1",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 2",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 3",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 4",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Category 5",
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 1?",
|
||||
answer: "Answer 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 2?",
|
||||
answer: "Answer 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 3?",
|
||||
answer: "Answer 3"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 4?",
|
||||
answer: "Answer 4"
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: "SIMPLE",
|
||||
data: {
|
||||
question: "Question 5?",
|
||||
answer: "Answer 5"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
export type Question = {
|
||||
points: number;
|
||||
type: "SIMPLE" | "MULTIPLE_CHOICE";
|
||||
};
|
||||
|
||||
export type SimpleQuestion = Question & {
|
||||
type: "SIMPLE";
|
||||
data: {
|
||||
question: string;
|
||||
answer: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type MultipleChoiceQuestion = Question & {
|
||||
type: "MULTIPLE_CHOICE";
|
||||
data: {
|
||||
question: string;
|
||||
answer: number;
|
||||
choices: string[];
|
||||
};
|
||||
};
|
||||
|
||||
export type Category = {
|
||||
name: string;
|
||||
questions: (SimpleQuestion | MultipleChoiceQuestion)[];
|
||||
};
|
||||
|
||||
export type Wall = {
|
||||
name: string;
|
||||
categories: Category[];
|
||||
};
|
||||
|
||||
export type Game = {
|
||||
name: string;
|
||||
walls: Wall[];
|
||||
};
|
||||
|
||||
export type Games = Game[];
|
||||
|
||||
export default games;
|
||||
@@ -1,932 +0,0 @@
|
||||
export default [
|
||||
{
|
||||
name: 'LAN Party',
|
||||
walls: [
|
||||
{
|
||||
name: 'Wall 1',
|
||||
categories: [
|
||||
{
|
||||
name: 'Category 1',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 2',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 3',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 4',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 5',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Wall 2',
|
||||
categories: [
|
||||
{
|
||||
name: 'Category 1',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 2',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 3',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 4',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 5',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'LAN Party 2',
|
||||
walls: [
|
||||
{
|
||||
name: 'Wall 1',
|
||||
categories: [
|
||||
{
|
||||
name: 'Category 1',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 2',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 3',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 4',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 5',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Wall 2',
|
||||
categories: [
|
||||
{
|
||||
name: 'Category 1',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 2',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 3',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 4',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Category 5',
|
||||
questions: [
|
||||
{
|
||||
points: 100,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 1?',
|
||||
answer: 'Answer 1'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 200,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 2?',
|
||||
answer: 'Answer 2'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 300,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 3?',
|
||||
answer: 'Answer 3'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 400,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 4?',
|
||||
answer: 'Answer 4'
|
||||
}
|
||||
},
|
||||
{
|
||||
points: 500,
|
||||
type: 'SIMPLE',
|
||||
data: {
|
||||
question: 'Question 5?',
|
||||
answer: 'Answer 5'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
7
src/routes/+page.server.ts
Normal file
7
src/routes/+page.server.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import games from '$lib/games/games';
|
||||
|
||||
export function load() {
|
||||
return {
|
||||
games
|
||||
};
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
<script lang="ts">
|
||||
import games from '$lib/games/lanparty';
|
||||
let { data } = $props();
|
||||
</script>
|
||||
|
||||
<h1 class="m-4 mb-8 text-7xl font-bold">Jeopardy</h1>
|
||||
|
||||
<div class="flex flex-col space-y-4">
|
||||
{#each games as game}
|
||||
{#each data.games as game, i}
|
||||
<a
|
||||
class="ms-4 me-4 rounded-xl border-2 p-4 hover:cursor-pointer hover:bg-emerald-200"
|
||||
href="/{game.name.toLocaleLowerCase().replaceAll(' ', '_')}">{game.name}</a
|
||||
href="/{i}">{game.name}</a
|
||||
>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
12
src/routes/[game]/+page.server.ts
Normal file
12
src/routes/[game]/+page.server.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { error } from '@sveltejs/kit';
|
||||
import games from '$lib/games/games';
|
||||
|
||||
export function load({ params }) {
|
||||
const index = parseInt(params.game);
|
||||
if (isNaN(index)) {
|
||||
error(404);
|
||||
}
|
||||
const game = games[index];
|
||||
if (game === undefined) error(404);
|
||||
else return game;
|
||||
}
|
||||
@@ -1 +1,75 @@
|
||||
<h1>This is Game ...</h1>
|
||||
<script lang="ts">
|
||||
import Wall from "./Wall.svelte";
|
||||
import type { Player } from "./Player";
|
||||
import { GameState } from "./GameState";
|
||||
import type { Game } from "$lib/games/games";
|
||||
|
||||
class GameManager {
|
||||
public state: GameState = $state(GameState.INIT);
|
||||
public game: Game;
|
||||
public players: Player[];
|
||||
|
||||
public currentWall = $state(0);
|
||||
|
||||
constructor(game: Game, players: Player[]) {
|
||||
this.game = game;
|
||||
this.players = players;
|
||||
}
|
||||
|
||||
startGame(): void {
|
||||
this.state = GameState.RUNNING;
|
||||
console.log("hello");
|
||||
}
|
||||
}
|
||||
|
||||
let { data } = $props();
|
||||
let players: Player[] = $state([
|
||||
{
|
||||
name: "Player 1",
|
||||
points: 0
|
||||
},
|
||||
{
|
||||
name: "Player 2",
|
||||
points: 0
|
||||
},
|
||||
{
|
||||
name: "Player 3",
|
||||
points: 0
|
||||
}
|
||||
]);
|
||||
let gameManager = new GameManager(data, players);
|
||||
|
||||
function addPlayer() {
|
||||
players.push({
|
||||
name: "Player " + (players.length + 1),
|
||||
points: 0
|
||||
});
|
||||
}
|
||||
|
||||
function removePlayer(index: number) {
|
||||
players.splice(index, 1);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="flex h-full flex-col">
|
||||
<h1 class="ms-4 text-7xl font-bold">{gameManager.game.name}</h1>
|
||||
{#if gameManager.state === GameState.INIT}
|
||||
<div class="p-4">
|
||||
<div class="flex items-center">
|
||||
<h2 class="grow pb-4 text-5xl">Spieler</h2>
|
||||
<button class="btn" onclick={() => gameManager.startGame()}>Start</button>
|
||||
</div>
|
||||
<div class="flex flex-col space-y-2 pb-4">
|
||||
{#each gameManager.players as player, i}
|
||||
<div class="flex items-center">
|
||||
<input class="inputField grow" type="text" bind:value={player.name} />
|
||||
<button class="btn" onclick={() => removePlayer(i)}>Löschen</button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
<button class="btn" onclick={addPlayer}>Spieler hinzufügen</button>
|
||||
</div>
|
||||
{:else}
|
||||
<Wall wall={gameManager.game.walls[gameManager.currentWall]} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
4
src/routes/[game]/GameState.ts
Normal file
4
src/routes/[game]/GameState.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export enum GameState {
|
||||
INIT,
|
||||
RUNNING
|
||||
}
|
||||
4
src/routes/[game]/Player.ts
Normal file
4
src/routes/[game]/Player.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface Player {
|
||||
name: string;
|
||||
points: number;
|
||||
}
|
||||
23
src/routes/[game]/Wall.svelte
Normal file
23
src/routes/[game]/Wall.svelte
Normal file
@@ -0,0 +1,23 @@
|
||||
<script lang="ts">
|
||||
import type { Wall } from "$lib/games/games";
|
||||
|
||||
interface Props {
|
||||
wall: Wall;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
let { wall }: Props = $props();
|
||||
</script>
|
||||
|
||||
<div class="grid h-full grid-flow-col grid-cols-5 grid-rows-6 gap-4 ps-4 pe-4 pb-4">
|
||||
{#each wall.categories as category}
|
||||
<div class="flex items-center justify-center text-3xl font-semibold">
|
||||
<div>{category.name}</div>
|
||||
</div>
|
||||
{#each category.questions as question}
|
||||
<div class="card">
|
||||
<div>{question.points}</div>
|
||||
</div>
|
||||
{/each}
|
||||
{/each}
|
||||
</div>
|
||||
Reference in New Issue
Block a user