Online play over WebSockets with any-string game codes, seats and spectators, and a 1-second heartbeat. Practice mode against Columbina, backed by a full solver, with an accuracy slider, spoilers, undo and piece freshness. Co-Authored-By: Claude Opus 5.5 <[email protected]>
49 lines
1.7 KiB
HTML
49 lines
1.7 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Moonchess Practice</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body>
|
|
<main>
|
|
<header class="bar">
|
|
<h1 class="page-title">Moonchess practice</h1>
|
|
</header>
|
|
|
|
<div class="players" role="group" aria-label="Choose your side">
|
|
<button class="player pickable" id="player-0"><span class="mark x">X</span><span class="who"></span></button>
|
|
<button class="player pickable" id="player-1"><span class="mark o">O</span><span class="who"></span></button>
|
|
</div>
|
|
<p class="hint">Click a side to play as it, any time. X moves first.</p>
|
|
|
|
<p id="status" class="status" aria-live="polite"></p>
|
|
|
|
<div id="board" class="board" role="grid" aria-label="Board"></div>
|
|
|
|
<div class="difficulty">
|
|
<label for="accuracy">Columbina's accuracy <output id="accuracy-value" for="accuracy"></output></label>
|
|
<input id="accuracy" type="range" min="0" max="100" step="5" value="50">
|
|
<p class="hint">Chance that each of Columbina's moves is perfect. Otherwise she plays a random empty square.</p>
|
|
</div>
|
|
|
|
<details class="spoiler">
|
|
<summary>Spoilers</summary>
|
|
<p id="spoiler-text"></p>
|
|
<label class="toggle"><input type="checkbox" id="freshness"> Show piece freshness</label>
|
|
</details>
|
|
|
|
<div class="footer">
|
|
<div class="actions">
|
|
<button id="undo" title="Undo (Ctrl+Z / Cmd+Z)">Undo</button>
|
|
<button id="new-game" class="primary">New game</button>
|
|
</div>
|
|
<p id="meta" class="meta"></p>
|
|
</div>
|
|
</main>
|
|
<script src="/static/board.js"></script>
|
|
<script src="/static/practice.js"></script>
|
|
</body>
|
|
</html>
|