Skip to content

go: mark dead stones and accept before area scoring - #1676

Merged
aaylward merged 1 commit into
mainfrom
claude/zen-euler-y3qze2
Oct 19, 2026
Merged

aaylward merged 1 commit into
mainfrom
claude/zen-euler-y3qze2

Conversation

@aaylward

@aaylward aaylward commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1668 (the "Also" item on dead-stone marking).

Until now, players had to capture dead groups before passing. Now two passes open a scoring phase instead of ending the game.

  • markDead {x,y} (either seat) marks the group at that point dead, or alive again. Each mark withdraws both acceptances.
  • Once both seats accept, the game ends on Tromp-Taylor area scoring, with dead stones counted as empty.
  • The side to move can play a stone to drop the marks and play on. A pass during scoring is refused.
  • The side to move's clock keeps running throughout, so neither seat can stall the scoring.
  • View: phase scoring, dead points, and scoring {acceptedBy, score} (the count as it stands).
  • Stored row: optional dead and accepted. Older rows still restore.

Tests cover the engine, serde round-trip and legacy rows, the e2e accept-and-mark flow, and the wire goldens.

Deploy order: merge muchq/muchq.github.io#455 first. A client from before this change can't leave the scoring phase.

The review panel was not run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PF5CZafkFhmkCfxasKpme9

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
1d4-web 59bbb76 Commit Preview URL

Branch Preview URL
Oct 19 2026, 05:30 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
iili 59bbb76 Commit Preview URL

Branch Preview URL
Oct 19 2026, 05:31 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ast-lol 59bbb76 Commit Preview URL

Branch Preview URL
Oct 19 2026, 05:31 PM

@github-actions github-actions Bot added service:games_hub Changes the games_hub image service:one_d4_worker Changes the one_d4_worker image labels Oct 18, 2026
@cursor

cursor Bot commented Oct 18, 2026

Copy link
Copy Markdown

Review: mark dead stones and accept before area scoring

Verdict: Approve. Right shape for #1668's dead-stone item: two passes open scoring instead of ending; either seat marks whole groups (toggle, clears both acceptances); both accept ends on Tromp-Taylor with dead counted as empty; side-to-move can play on (drops marks) and its clock runs the whole time. Tip d6718610. All 24 checks green.

What works

Engine. scoring() = two passes and not over. markDead / accept gated by checkScoring; pass in scoring refused; placed clears marks when playing on. Score paints dead points empty then area-counts. Restore validates ascending whole groups, refuses both-accepted-still-open and score-without-two-passes, and still reads pre-marking rows (optional dead / accepted). Clock: mark/accept do not reset turn_started_ms; timeout/flag still win during scoring — pinned.

Adapter / wire. Phase scoring; dead points and scoring {acceptedBy, score} on the view; WireScore shared with the result. Decode wires markDead / accept. Command series + hub_e2e declarations updated. E2e covers mark-withdraws-acceptance and double-accept end; wire golden covers mark/unmark and acceptances; engine tests cover group mark/revive, play-on, clock-through-scoring, restore refusals.

Serde. Writes dead / accepted only when non-empty/true; legacy scored rows without those fields restore.

Non-blocking / ops

  • Deploy order: go: mark dead stones and accept in the scoring muchq.github.io#455 is still open. As the PR says, merge that first — an old client cannot leave scoring.
  • Review panel was not run (disclosed).
  • Resign during scoring leaves any marks on the ended state (view may still show dead); score ending is the only path that needs them.

Tip d6718610. Part of #1668.

@cursor

cursor Bot commented Oct 18, 2026

Copy link
Copy Markdown

CI: d6718610

All 24 checks green (build-and-test, asan, ubsan, tsan included). Approve unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PF5CZafkFhmkCfxasKpme9
@aaylward
aaylward force-pushed the claude/zen-euler-y3qze2 branch from d671861 to 59bbb76 Compare October 19, 2026 17:29
@cursor

cursor Bot commented Oct 19, 2026

Copy link
Copy Markdown

Tip 59bbb76d

Rebase onto main (#1677/#1678): go scoring unchanged; FilledStart takes HostedTerms with the rest of the adapters. Approve unchanged. CI restarting on this tip.

@aaylward
aaylward merged commit 0c5d8e5 into main Oct 19, 2026
23 checks passed
@aaylward
aaylward deleted the claude/zen-euler-y3qze2 branch October 19, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

service:games_hub Changes the games_hub image service:one_d4_worker Changes the one_d4_worker image

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants