Update 2025-04-13_16:25:39
This commit is contained in:
65
static/index.html
Normal file
65
static/index.html
Normal file
@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ByThePowerOfMemory</title>
|
||||
<link rel="stylesheet" href="/static/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>ByThePowerOfMemory</h1>
|
||||
|
||||
<div id="game-area"></div>
|
||||
|
||||
<div class="button-bar">
|
||||
<button id="position-btn" >Position</button>
|
||||
<button id="color-btn" >Color</button>
|
||||
<button id="shape-btn" >Shape</button>
|
||||
<button id="number-btn" >Number</button>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<button id="start-btn">Start Game</button>
|
||||
<button id="submit-btn" disabled>Submit</button>
|
||||
<button id="restart-btn">Restart</button>
|
||||
<button id="help-btn">❓ Help</button>
|
||||
<button id="stats-btn">📊 Stats</button>
|
||||
</div>
|
||||
|
||||
<div id="scoreboard">
|
||||
<p>✅ Correct: <span id="score-correct">0</span></p>
|
||||
<p>❌ Wrong: <span id="score-wrong">0</span></p>
|
||||
</div>
|
||||
|
||||
<div id="chart-container">
|
||||
<canvas id="scoreChart" width="800" height="300"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import { startRound } from "/static/round.js";
|
||||
import { setupButtons } from "/static/button.js";
|
||||
import { guess } from "/static/score.js";
|
||||
import { submit, restart, startGame } from "/static/state.js";
|
||||
import { showOverlay } from "/static/overlay.js";
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
setupButtons({
|
||||
onStart: startGame,
|
||||
onSubmit: submit,
|
||||
onRestart: restart,
|
||||
onColor: () => guess("color"),
|
||||
onPosition: () => guess("position"),
|
||||
onShape: () => guess("shape"),
|
||||
onNumber: () => guess("number")
|
||||
});
|
||||
|
||||
document.getElementById("stats-btn").addEventListener("click", showOverlay);
|
||||
|
||||
startRound();
|
||||
});
|
||||
</script>
|
||||
<script type="module" src="/static/chart.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user