Files
moonchess/static/practice.html
T
tukaunuandClaude Opus 5.5 ce6b71eb35 Serve practice mode from the main server, add mode switch, fix touch
Practice mode is now at /practice on server.py instead of a separate
server, with a button in the bottom-right corner of each page to the
other mode. Touch: no double-tap zoom, no sticky hover after a tap, no
long-press selection on the board, and a pressed look on tapped squares.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 01:47:27 +02:00

50 lines
1.8 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>
<a class="mode-switch" href="/">Multiplayer</a>
<script src="/static/board.js"></script>
<script src="/static/practice.js"></script>
</body>
</html>