Skip to content

rummy: take down into the discard pile; a score sheet - #1614

Merged
aaylward merged 5 commits into
mainfrom
claude/rummy-game-backend-ui-fvxk0l
Sep 29, 2026
Merged

aaylward merged 5 commits into
mainfrom
claude/rummy-game-backend-ui-fvxk0l

Conversation

@aaylward

Copy link
Copy Markdown
Collaborator

Changes from play-testing 7-card rummy.

Taking down into the discard pile (7-card and 10-card, not gin)

  • A draw can take the top card, or every card from the top down to a named card. Taking more than one card commits the player to meld or lay off the deepest card taken before they can discard.
  • A take-down is only allowed if that deepest card could actually be played. It can be melded from the hand plus the cards taken, or laid off onto a table meld, including after other cards bridge the gap (playable in meld.h).
  • The view now carries:
    • discardPile: the whole pile, bottom to top.
    • discardTakeable: the cards the viewer could take down to right now.
    • mustPlay: the card that still has to be played.
  • drawDiscard now takes an optional card. Gin refuses anything but the top card.
  • A player who leaves while owing a card takes the obligation with them.

Score sheet

  • The table records every finished deal: variant, winner (none for a gin draw) and points.
  • standings[].points is each seat's total. The view carries the sheet as scoreSheet.
  • The sheet is stored as an optional scoreSheet key in the v2 table row. A hub that predates it ignores the key, so a rollback keeps every table and only loses its sheet.

Unrelated fix: leaving the room while seated at a table

  • The hub sent roomLeft before the table's leave events and a room state. The client re-entered the room from that late state, rewrote the URL back to the room, and got "not in room" on its next command.
  • roomLeft is now the last frame the leaver gets. LeavingTheRoomFromATableEndsOnRoomLeft pins this.

Verified

  • The rummy lib and games_hub test suites (including the PG suites) pass locally.
  • Mutation checks covered the must-play refusal, the take-down check, the check that the owed card has been played, the reset when the owing player leaves, and scoring a deal onto the sheet. Every mutant was killed.
  • Played in a browser against muchq.github.io's UI PR: a take-down, the must-play hint, a full deal onto the score sheet, and leave-room from a table.

Generated by Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 29, 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 5b006e4 Commit Preview URL

Branch Preview URL
Sep 29 2026, 05:26 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 29, 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 5b006e4 Commit Preview URL

Branch Preview URL
Sep 29 2026, 05:26 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 29, 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 5b006e4 Commit Preview URL

Branch Preview URL
Sep 29 2026, 05:27 PM

@github-actions github-actions Bot added service:games_hub Changes the games_hub image service:unknown Impacted services could not be computed labels Sep 29, 2026
@aaylward
aaylward force-pushed the claude/rummy-game-backend-ui-fvxk0l branch from 82dc87e to 5b006e4 Compare September 29, 2026 17:25
@aaylward
aaylward enabled auto-merge (squash) September 29, 2026 17:32
@aaylward
aaylward disabled auto-merge September 29, 2026 17:56
@aaylward
aaylward merged commit c3d5277 into main Sep 29, 2026
24 checks passed
@aaylward
aaylward deleted the claude/rummy-game-backend-ui-fvxk0l branch September 29, 2026 17:56
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:unknown Impacted services could not be computed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants