Update 2025-04-13_17:31:30

This commit is contained in:
root
2025-04-13 17:31:30 +02:00
parent 06fb52f574
commit 3013631fd7
19 changed files with 1043 additions and 130 deletions

30
static/help.js Normal file
View File

@ -0,0 +1,30 @@
import { DEBUG } from "./config.js";
export function showHelp() {
if (DEBUG) console.log("❔ showHelp() opened");
const helpOverlay = document.createElement("div");
helpOverlay.id = "help-overlay";
helpOverlay.innerHTML = `
<div class="help-content">
<h2>🧠 How to Play</h2>
<p>This is a memory game with 4 dimensions:</p>
<ul>
<li><b>Position</b> where the tile appears</li>
<li><b>Color</b> the color of the emoji</li>
<li><b>Shape</b> the emoji symbol</li>
<li><b>Number</b> the digit inside</li>
</ul>
<p>You see one tile then after a short pause the board changes. Your task: guess which <b>dimension stayed the same</b>.</p>
<p>Use the buttons to select the unchanged dimension. You can only pick once per round.</p>
<button id="close-help">Close</button>
</div>
`;
document.body.appendChild(helpOverlay);
document.getElementById("close-help").onclick = () => {
helpOverlay.remove();
if (DEBUG) console.log("❌ showHelp() closed");
};
}