Skip to content

rummy: take down by playing the card; no meld hints - #393

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

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

Conversation

@aaylward

@aaylward aaylward commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

UI for MoonBase#1617's takeDown.

Merge only after MoonBase#1617 is deployed. The live #1614 hub can't decode takeDown: it drops the session, and the player is dropped again on every retry.

Taking the pile down:

  1. On your draw, tap any card under the top. All of them look alike.
  2. Pick cards from your hand, then Take down and meld. Or tap any table meld to lay the card off. The melds are not lit, so a player can't probe which pile cards fit; the hub accepts or refuses the lay-off.
  3. One move goes to the hub: takeDown{card, cards} or takeDown{card, meldIndex}. The rest of the stack lands in your hand.
  4. The hint follows your picks, including "not a set or a run". Put the X back cancels the pick and clears the hand cards picked for it. The top card is still a plain draw.

Hints removed (you have to spot these yourself):

  • which pile cards could be taken down to, or laid off
  • the hand order "by melds"; a stored "melds" order now falls back to suit
  • the "fits a meld" marks on hand cards
  • gin's hand count and knock hint: Knock is offered on any legal throw, and the hub decides

Also removed:

  • mustPlay / discardTakeable
  • the UI's best-arrangement search and its copy of the arrangement corpus, which nothing uses now

Verified:

  • vitest, tsc and eslint pass.
  • Four-lens review panel ran (rules, wire, test adequacy, UI). The UI mutation survivors it found are now killed by new tests.
  • Not yet checked in a browser.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MXWdcUNjGezMzyuCkaMMLg

@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 abee059 Commit Preview URL

Branch Preview URL
Sep 29 2026, 10:38 PM

@cursor

cursor Bot commented Sep 29, 2026

Copy link
Copy Markdown

Blocking

None on the code. Wire matches MoonBase#1617 (takeDown{card, cards|meldIndex}, bare drawDiscard, no mustPlay / discardTakeable); gin stays top-only; deeper pile cards are alike (no lit takeables); take-down lay-offs hit every meld unlit so the player can’t probe fit; corpus / bestArrangement / knock-hint chrome are gone as claimed. CI green.

Do not merge until MoonBase#1617 is deployed. The #1614 hub can’t decode takeDown and drops the session — same order the hub PR states.

Nits

  • Switching the pile card (pickDownTo A → B) keeps the hand selection. Putting A back clears it; changing targets does not. Clear selected whenever downTo changes to a different face so a set built for A isn’t offered against B.
  • While a take-down is armed, the action bar hides stock / take-top, but the middle stock and top discard stay clickable. Either gate those on downTo === null, or leave them as the escape hatch and drop the stock/take buttons from the armed bar for one story.
  • describeLastMove for takeDown uses face(move.cards[0]) with no empty guard. Fine if the hub always puts the played card first (smithy says so); a one-line fallback would harden a bad frame.

Fine

Pick → hand meld or unlit lay-off → one takeDown; Put back clears the pile pick and its hand cards; refusal keeps the pick to fix; stored melds order falls back to suit; gin knock is any legal throw, hub judges. Merge after MoonBase#1617 is live.


Review of #393

@aaylward
aaylward force-pushed the claude/rummy-game-backend-ui-fvxk0l branch from e953532 to abee059 Compare September 29, 2026 22:37
@aaylward
aaylward enabled auto-merge (squash) September 29, 2026 22:38
@aaylward
aaylward merged commit 4db0942 into main Sep 29, 2026
2 checks passed
@aaylward
aaylward deleted the claude/rummy-game-backend-ui-fvxk0l branch September 29, 2026 22:40
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