v0.8.0.6 — your move waits its turn, the lit pile keeps asking to be looked at
Your actions are put away while the board is catching up. The board on screen is behind the game, so a move offered there is a move against a position that has already moved on — and the screen had grown to four things competing at once: the district, the history, the catching-up row, and a lit pile. Skip is one click away, so the wait stays voluntary. That could have locked a player out of their own game. Hiding actions behind busy() makes that flag the thing standing between a player and their turn, and without requestAnimationFrame nothing ever advances the queue — so busy() would never clear. Caught by the DOM-stub test that has been proving this page still starts since long before any of this existed. No rAF now means draw everything at once, which is what pace 0 does deliberately, and a queue that throws empties itself rather than stranding anyone. The lit pile was never brief: measured, it stays lit for 6997ms at 10x. It was a single flash over a dark fill, easy to miss while watching the district — a state that settles stops asking to be looked at. It pulses now for as long as the move is up. And the pace ceiling was not theoretical. 10x was the top of the ladder and was reported still a bit fast; it runs to 20 now. A control whose limit is reached in ordinary use has the wrong limit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6cF1iYvJ1kNmzYBzu4QX6
This commit is contained in:
co-authored by
Claude Opus 5
parent
3fca325699
commit
64e8ce584f
@@ -251,6 +251,25 @@ describe('the step queue', () => {
|
||||
assert.ok(q.showing() !== null, 'the caption should survive a reset');
|
||||
});
|
||||
|
||||
it('can always be emptied, so a player is never stranded behind it', () => {
|
||||
/**
|
||||
* "Your Move" is put away while the board is catching up (v0.8.0.6), which makes `busy()` the
|
||||
* thing standing between a player and their own turn. So the ways it can be cleared matter more
|
||||
* than they did: `skip()` must always work, from any state, including one where the clock has
|
||||
* never advanced — which is exactly the situation a page with no `requestAnimationFrame` is in,
|
||||
* and how this was found.
|
||||
*/
|
||||
const { steps, final } = realSteps(1917398, 400);
|
||||
const q = createStepQueue();
|
||||
q.reset(baseline(1917398));
|
||||
q.push(steps);
|
||||
// Never advanced at all: no frame has been shown, and the queue is full.
|
||||
assert.equal(q.busy(), true);
|
||||
assert.equal(q.skip(), true, 'a never-advanced queue must still be skippable');
|
||||
assert.equal(q.busy(), false, 'and must be idle afterwards, or the player stays locked out');
|
||||
assert.deepEqual(q.current(), final);
|
||||
});
|
||||
|
||||
it('draws nothing before a reset has arrived', () => {
|
||||
const q = createStepQueue();
|
||||
assert.equal(q.current(), null);
|
||||
|
||||
Reference in New Issue
Block a user