Skip to content

Fix joker PDF icon and reject natural five of a kind - #71

Merged
mbuckaway merged 3 commits into
masterfrom
topic/pdf-joker-and-five-of-a-kind
Sep 19, 2026
Merged

mbuckaway merged 3 commits into
masterfrom
topic/pdf-joker-and-five-of-a-kind

Conversation

@mbuckaway

Copy link
Copy Markdown
Owner

Summary

  • PDF joker icon — the results report drew a joker as a bare ; it now renders ★ JOKER to match the HTML chip. The Best-5 card columns are widened (1.20/1.30 → 1.60 in) so the wider text does not clip the trailing card. Both PDF goldens are regenerated.
  • Reject natural five of a kind — five of a kind is only a valid poker hand with a wild card. Five physical cards of one rank with no joker now score as four of a kind (QUADS), and standings.hand_name names that shape without crashing. The five-of-a-kind self-test is simplified to the wild-only rule.
  • Docs — the in-app user guide and the design contract (spec.md §5, requirements.md R-41/R-44) now state the wild-only five-of-a-kind rule.

Notes

Testing

  • Unit tests pass (nox -s unit: 6472 passed, 99.85% coverage)
  • Static gate passes (nox -s lint typecheck importlint userguide_drift)
  • PDF goldens regenerate byte-for-byte (tools/gen_pdfexport_fixtures.py --check)
  • User guide regenerates (tools/gen_userguide.py --check)

The report's inline card cell drew a joker as a bare ★, while the HTML
chip renders "★ JOKER". Unify the three joker spellings on one
_JOKER_TEXT and widen the Best-5 columns (1.20/1.30 -> 1.60 in) so the
wider text does not clip the trailing card. Regenerates both PDF goldens.
Five of a kind is only a valid poker hand with a wild card. Five physical
cards of one rank with no joker now score as four of a kind:
classify_pattern returns QUADS for a five-identical natural hand, and
standings.hand_name names it via the highest-multiplicity rank so it no
longer KeyErrors. Simplifies the five-of-a-kind self-test and updates the
spec section 5 and requirements R-41/R-44 to the wild-only rule.
The hand-rankings list and the self-test chapter still described natural
five of a kind; update both to the wild-only rule and regenerate the
bundled HTML.
@mbuckaway
mbuckaway merged commit 0fb857b into master Sep 19, 2026
27 checks passed
@mbuckaway
mbuckaway deleted the topic/pdf-joker-and-five-of-a-kind branch September 19, 2026 11:47
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.

1 participant