Resume the clock on leaving the score sheet, and split the readout in three
Closing the score sheet left the clock paused, so glancing at the score or nudging a clock cost a tap on play. It now picks the turn back up on the way out. openScore() records whether it was the thing that paused the clock, so a pause the players set themselves survives. After a score change there is nothing to resume — newGame() has already moved to IDLE — and resumeNow() only acts on PAUSE, so that case needs no special handling. The scrim behaves the same, since dismissing discards the staged edits and leaves the turn live. togglePause() had the resume arithmetic inline; it splits out as resumeNow() to match pauseNow(), leaving the play button and the sheet on one path. The score line becomes three labelled lines: You: 2 out of 5 Them: 1 Moves: 7 .head is a two-column grid with a max-content label column, so the values line up whatever the system font renders — no hand-tuned em width to drift between iOS and Android. Each line is a display:contents wrapper, which keeps one element per line to hide when a one-point match drops the score. The gap above Moves rides on that row's two cells, since a display:contents row can't carry a margin, and a :not([hidden]) guard drops it when there is no score line above to separate from. Each half reads from its own side of the board, so both players see their own score on the You line. st.score is already indexed by side, so the mirroring costs nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* Cache-first: once installed the clock never touches the network again. */
|
||||
const CACHE = "bgclock-v5";
|
||||
const CACHE = "bgclock-v6";
|
||||
const FILES = [
|
||||
"./",
|
||||
"./index.html",
|
||||
|
||||
Reference in New Issue
Block a user