Skip to content

Rummy: dealer's-choice table layer #1609

Description

@aaylward

Follow-up to #1608. Every rummy table becomes a dealer's-choice session: deal after deal until people leave, and the dealer picks each deal's variant. There are no match targets.

Engine

  • The table holds the dealer, the deal number, standings (hands won), and the current deal with its variant.
  • The dealer rotates after each deal. The first dealer is the table's opener and picks the variant with Deal.
  • The dealer may choose only a variant that fits the seats (basic 2–4; gin 2 only and 500 2–4 once they land).
  • If the dealer is disconnected, the choice passes to the next connected seat.
  • Serde v2: a v1 row loads as a single basic deal.

Wire

  • startGame carries the first variant.
  • New chooseVariant{variant}: dealer only, between deals.
  • View: variant, dealNumber, standings, choosing {dealer, options}.
  • dealEnded carries the hand's result. gameEnded means only that the table broke up.

Stats

  • Each deal is one game played/won, logged under its own variant word (rummy, gin, rummy500).
  • Update the stats reader, deja, and the otel_contract pin.

UI

  • A variant picker in the dealer's chair between deals, and "X is choosing…" for everyone else.
  • A standings strip and an end-of-hand sheet.
  • The lobby row reads "rummy · dealer's choice · now: …".

Tests

  • Engine rules, including rotation, choice validity and disconnected-dealer handoff.
  • Serde v1→v2 with frozen payloads.
  • Mirror e2e across several deals.
  • Wire goldens.
  • The PG restart test between deals.
  • UI picker and standings.

Basic is the only variant offered until Gin and Rummy 500 land.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions