Files
ProLibertateGames/docs/RULES-euchre.md
T
Claude 487c68419e Add app shell with Euchre and Sequence, LAN/Bluetooth play
First vertical slice: the whole shell plus two games playable end to end,
so every layer is exercised before the other nine games are built on it.

Games
- Euchre: bowers, ordering up, dealer discard, going alone, stick the
  dealer, and full scoring. Rule variants (deck size, points to win,
  stick the dealer, going alone) are toggles in game setup.
- Sequence: two-eyed and one-eyed jacks, free corners, locked sequences,
  the shared-chip limit, and dead-card exchange. Teams, players per team
  and the sequence target are toggles.
- The board layout in SequenceBoard is generated, not the commercial
  board — it holds every structural property the rules need, but does not
  match a physical board. Documented in docs/RULES-sequence.md.

Multiplayer
- One transport abstraction over newline-delimited JSON, implemented
  twice: LAN via NSD discovery and TCP, Bluetooth via Classic RFCOMM.
  A lobby advertises on both at once, so a table can mix them.
- Host-authoritative: clients send move intents, the host re-validates
  every one against the rules, and each client receives a state redacted
  for its own seat so hidden information never crosses the wire.
- Seats start as AI and are handed to people as they join, which is what
  makes any mix of humans and AI work without a separate code path.

Shell
- Main menu lists all eleven games; the nine without engines are marked
  coming soon and are driven entirely by GameCatalog.
- Settings: sound, animation speed (one multiplier drives card movement
  and AI thinking time), and OTA updates from the latest GitHub release.
- Layouts measure available space rather than assuming an orientation.

The game package is free of Android types, so the rules engines and AI
run under plain JUnit; 43 tests cover ranking, following suit, scoring,
sequence detection, redaction, wire round-trips and full random and AI
playthroughs.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015qjfMiPUDshdKEUa6vxqzN
2026-08-05 22:37:05 +00:00

3.1 KiB
Raw Blame History

Euchre — implemented rules

This is the ruleset the engine enforces, so you can check it against how you actually play. Anything marked toggle is exposed in the game setup screen; anything else is currently fixed and would need a code change.

Table

  • Four players, two fixed partnerships. Seats 0 and 2 are one team, seats 1 and 3 are the other, so partners sit opposite each other.
  • The deal rotates one seat clockwise after every hand.

Deck — toggle

  • 24 cards (9, 10, J, Q, K, A in each suit). The standard game.
  • 32 cards (7 through A). Five cards are still dealt to each player and one is still turned up, so the extra cards simply deepen the undealt remainder. Some 32-card variants deal eight cards and play eight tricks; that is not what this does.

Ranking

With trump named, the order from the top is:

  1. Right bower — the jack of trump.
  2. Left bower — the jack of the same colour as trump. It counts as a trump card, not as a card of its printed suit. If spades are trump, the jack of clubs is a spade for the whole hand: it must be played when spades are led, and it does not satisfy following clubs.
  3. A, K, Q, 10, 9 of trump.

Non-trump suits rank A, K, Q, J, 10, 9. A card that is neither trump nor of the led suit cannot win a trick.

Bidding

Round one. Starting to the dealer's left, each player may order up the turned card or pass. Ordering up makes that card's suit trump; the dealer takes the card into hand and discards one card face down.

Round two. If all four pass, the turn card is turned down and its suit may not be named. Starting again to the dealer's left, each player may name any other suit or pass.

Stick the dealer — toggle, on by default. If the first three players pass in round two, the dealer must name a suit. With the toggle off, a fourth pass throws the hand in and it is redealt by the next dealer.

Going alone — toggle, on by default. A maker may declare going alone when ordering up or naming trump. Their partner sits the hand out entirely and plays no cards; the hand is played three-handed.

Play

  • The player to the dealer's left leads to the first trick; after that the winner of each trick leads to the next.
  • You must follow the led suit if you hold it, remembering that the left bower belongs to trump. Otherwise you may play anything.
  • Five tricks are played.

Scoring

Let the makers be the team that named trump.

Outcome Points
Makers take 3 or 4 tricks 1 to the makers
Makers take all 5 2 to the makers
Makers take all 5, playing alone 4 to the makers
Makers take fewer than 3 (euchred) 2 to the defenders

A lone hand that takes 3 or 4 tricks scores 1, the same as an ordinary make.

Game — toggle. First team to 10 points (default), or 11, or 15.

Known simplifications

  • Cards are dealt five at a time rather than in the traditional 3–2 / 2–3 packets. With a shuffled deck this changes nothing about the odds, but it does mean the deal does not look like a real one.
  • No defending alone, no farmer's hand, no notrump or misère bids.