Editorial illustration: Dealing Joker without opening pairs

Dealing Joker without opening pairs

The problem I needed to solve

I did not want Joker to begin by discarding ready-made pairs before meaningful play started. Every opening hand should be pair-free while distribution remains balanced.

Implementation in this snapshot

JokerGame.PairFreeDealShuffle groups ordinary cards by rank and distributes matching ranks across different seats. The Joker enters a smaller bucket, and ordering is prepared for round-robin CardDealer dealing.

The design decision and its cost

This is a constrained deal rather than unrestricted shuffling followed by pair removal. Of 33 cards, one player receives nine and the other three receive eight.

Current boundaries

Avoiding opening pairs changes distribution; I cannot describe it as equivalent to every ordinary random ordering. Deal animation follows the logical result and does not create fresh randomness.

Review scenarios and contract meaning

This deal answers a specific experience requirement: opening hands should not contain ready-made pairs to discard. The algorithm cannot freely generate every ordering and expect that requirement to happen automatically. Grouping by rank and sending matching ranks to different seats applies the constraint while building hands. The final ordering is then prepared for round-robin dealing, and presentation should display that same result. With thirty-three cards, perfectly equal hand sizes are impossible; nine versus eight follows from the total rather than an animation error.

The cost is a changed space of opening states. I do not equate it with unconstrained random dealing, because some hands are deliberately excluded. An explanation of fairness needs to begin there rather than with cards that appear to move randomly. Useful checks count each seat’s cards, ensure no opening pair and verify exactly one Joker. These are contract criteria, not a measured claim about winning probabilities. Pair removal after a player’s later selection remains part of play; the opening restriction does not remove pairing throughout the match.

Presentation order should not reinterpret logical ownership. Rearranging flights for speed or appearance must preserve the generated assignments. The deal should produce one answer and each seat’s hand should consume it. Motion timing can change, while pair-free opening hands and their counts remain model concerns.

What this stage taught me

For me, opening rules define the experience. The constraint belongs explicitly in logical dealing, with presentation showing those cards and pairing beginning from a player’s actual choice.

Explore Dalo

Latest devlogs

Editorial illustration: Presenting selection and captures in Pasur

Presenting selection and captures in Pasur

Pasur motion should explain which hand card was played and which table cards were captured.

Read article
Editorial illustration: Pasur bot decisions from capture options

Pasur bot decisions from capture options

My teammate’s Pasur bot chooses among legal options without inspecting hidden opposing cards.

Read article
Editorial illustration: Capturing table cards in Pasur

Capturing table cards in Pasur

In my teammate’s implementation, Pasur combines selecting a hand card with selecting table cards. Its rules must produce valid sets and prohibit ignoring an available capture.

Read article
Dalo