Skip to content

Clearpath cutoff display - #528

Merged
Perlkonig merged 3 commits into
AbstractPlay:developfrom
MarkSteere:clearpath-cutoff-display
Nov 17, 2026
Merged

Perlkonig merged 3 commits into
AbstractPlay:developfrom
MarkSteere:clearpath-cutoff-display

Conversation

@MarkSteere

Copy link
Copy Markdown
Contributor

After a cut-off win (a placement that leaves the opponent without any possible connection) the board drew the winner’s sealing chain as a line, and the chain may step diagonally, so a player reported a “winning path through crosscuts”. The board now draws one of the winner’s remaining possible connections as a dashed line, orthogonal steps only, with the stones still to be placed shown faintly. A completed winning path is still a solid line. The move log names the winner and the dashed line, and the game description states the cut-off ending. Game version 20261117. Three commits (rings, then the dashed line, then a test fix); squash if you prefer.

MarkSteere and others added 3 commits November 17, 2026 07:15
… a line

A player reported a finished game in which the "highlighted path" ran through
a crosscut. The game had ended by cut-off (the loser had no possible connecting
path left), and the board drew the sealing chain of the winner's stones, which
may step diagonally, as a line, so it looked like a claimed winning path.

- After a cut-off the sealing stones are now ringed (`exit` annotation, shape
  circle, solid) and no line is drawn. A completed winning path is still drawn
  as a line.
- The game description states the cut-off ending, and the move-log line for it
  now reads "{{player}} no longer has any possible connecting path. The ringed
  stones cut {{player}} off."
- Game version 20261117. Tests: the reported position (reached by a legal move
  sequence) and the ring/line distinction; 18 tests pass, full suite 2633 pass,
  typecheck, eslint and locale checks clean, 10,943 render JSONs of random games
  validated against the renderer schema.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017npPuLb95uaXUHuPGvTT1b
…e sealing chain

Replaces the rings of the previous commit. After a cut-off win the board now
draws one of the winner's remaining possible connections (the one needing the
fewest further stones, orthogonal steps only, so it never passes a crosscut) as
a dashed line, with the stones still to be placed drawn faintly (legend glyphs
with opacity 0.35). A completed winning path is still drawn as a solid line.

The move-log line for the cut-off ending now reads "{{player}} no longer has
any possible connection, so {{winner}} cannot be stopped. The dashed line shows
one of the possible connections still open to {{winner}}."

New helper cpPossibleConnection (0-1 breadth-first search). Tests cover the
route chosen for two cut-off positions, the faint stones, and random play;
19 tests pass, typecheck, eslint and locale checks clean, 10,943 render JSONs
of random games validated against the renderer schema.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017npPuLb95uaXUHuPGvTT1b
The random-play test compared the faint stones (listed row by row) with the
unoccupied points of the dashed route (listed edge to edge), which only agree
by chance. Compare them sorted.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017npPuLb95uaXUHuPGvTT1b
@Perlkonig
Perlkonig merged commit f5ad096 into AbstractPlay:develop Nov 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants