Skip to content

rummy: the whole discard pile, take-downs, a score notepad - #391

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

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

Conversation

@aaylward

@aaylward aaylward commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

UI for the play-test changes in MoonBase#1614.

Discard pile (7-card and 10-card):

  • The whole pile is shown in a tight overlapping spread, opening on the top card. A long pile tightens to fit, then scrolls.
  • On your draw, each deeper card you could play is lit and raised; tapping it takes the pile down to that card.
  • Gin still shows only the top card.

Must-play:

  • A card you must play (after taking down) is outlined in your hand, and a hint tells you to play it first.
  • Discard stays disabled until that card has been played.

Score notepad:

  • A paper notepad pinned in the felt's top corner.
  • It has a column per player, a row per deal with the points in the winner's column, and totals at the bottom. It shows the last five deals; the totals count all of them.
  • A gin draw shows as a "draw" row. A player who has left keeps their column.

Compatibility: every new view field is optional. Against a hub without them, the pile shows only its top card and the notepad has headers and zero totals, no deals.

Verified:

  • vitest, tsc and eslint pass.
  • Played in a browser against a local hub: a take-down, the must-play hint, and a full deal onto the notepad, on desktop and at phone width. The later CSS fixes (spread scroll, hover, notepad paging and placement) are unit-tested where they're logic, not re-checked in a browser.

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
muchq cf577ba Commit Preview URL

Branch Preview URL
Sep 29 2026, 05:11 PM

@aaylward
aaylward force-pushed the claude/rummy-game-backend-ui-fvxk0l branch from 32b92f2 to d231239 Compare September 29, 2026 16:35
@aaylward
aaylward force-pushed the claude/rummy-game-backend-ui-fvxk0l branch from d231239 to 53c3e3b Compare September 29, 2026 16:38
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MXWdcUNjGezMzyuCkaMMLg
@cursor

cursor Bot commented Sep 29, 2026

Copy link
Copy Markdown

Blocking

None. Wire matches MoonBase#1614 / rummy.smithy (discardPile, discardTakeable, mustPlay, scoreSheet, optional drawDiscard.card, standings.points); every new view field is optional so an older hub stays on top-only discard. Take-down names the deepest card; top-only stays a bare drawDiscard. Gin keeps the pile squared. canDiscard refuses while mustPlay is set; the owed card is marked and the “can’t go straight back” copy only blames a lone take. Score notepad pages the last five deals, keeps departed winners’ columns, and draws gin draws as a row. CI green.

Nits

  • Against a hub with no scoreSheet (or before the first deal ends), the notepad still mounts: headers and Total 0. The PR claims it stays empty — prefer rendering nothing when lines.length === 0.
  • Deeper takeables light and accept clicks from drawing && discardTakeable alone, without also requiring discardDrawable. Harmless if the hub keeps those fields in sync; gating on takeable (or discardDrawable) would match the top card.

Fine

Spread opens scrolled to the top; long piles tighten then scroll; stock-out / top-only hints; must-play still allows meld/lay-off copy for other picks; hook sends { card } only for a take-down. MoonBase#1614 is already merged — deploy this so the take-down chrome matches the hub.


Review of #391

@aaylward
aaylward merged commit 0812755 into main Sep 29, 2026
2 checks passed
@aaylward
aaylward deleted the claude/rummy-game-backend-ui-fvxk0l branch September 29, 2026 19:07
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