Repository navigation
Darts: keep the two-line aim moving after a turn or a dialog - #375
Merged
Merged
Conversation
The sweep position comes from the clock, but the canvas only redraws while the animation loop runs, and only kick() starts it. Nothing kicked it when a turn began (startTurn -> render), and a dialog made canAim() false, which ended the loop for good. The line then stood still on screen while barNow() ran on, so a tap stopped it somewhere else - the owner's report on a phone right after #373. render() now kicks the loop whenever it is a person's turn in two-line mode, and the loop keeps running through dialogs (barsRun ignores the scrim; taps are still refused there by canAim). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VoRrYWfb9CHLaEtJPXc4HH
Contributor
Author
|
Diff review: two lines of logic. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #374
Cause: the line's position follows the clock, but the canvas only redraws while the animation loop runs, and only
kick()starts it. Nothing kicked it when a turn began, and a dialog ended the loop for good. On screen the line stood still; a tap stopped it where the clock said, somewhere else.Fix:
render()kicks the loop when it is a person's turn in two-line mode; the loop's condition (barsRun) no longer stops for dialogs. Taps under a dialog are still refused bycanAim().Proof (Playwright, canvas compared across 250 ms, local servers for this branch and for main)
So on main the line never moved on its own at all; the #373 run passed because every tap kicks the loop, and the line starts at a random point, so a still line was not seen. That check is now in the proof script, and
tools/test.jsguards the kick and the loop condition (fails on main's file, 4212 green here).browser-check: 36 of 36.Not changed: at the start of a turn the status still shows the last turn's total ("This turn: 30") instead of the tap prompt, as it always did in drag mode.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VoRrYWfb9CHLaEtJPXc4HH