Skip to content

Add pi-texas-holdem: Texas Hold'em on an oval terminal table - #1

Open
geminixiang wants to merge 9 commits into
mainfrom
claude/texas-holdem-extension-qg99qu
Open

Add pi-texas-holdem: Texas Hold'em on an oval terminal table#1
geminixiang wants to merge 9 commits into
mainfrom
claude/texas-holdem-extension-qg99qu

Conversation

@geminixiang

Copy link
Copy Markdown
Owner

Adds a new Pi extension with a tested no-limit Hold'em engine (deck,
hand evaluator, betting rounds, side pots), a box-drawing oval table
renderer, and WebSocket host/join networking for playing over the LAN.
Identity is just the machine hostname, and the table shows today's
token usage. /poker bots plays solo against simple bots right away;
/poker host and /poker join wire up multiplayer.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015iGzsop5jB18LBJk4EtVko

claude and others added 9 commits August 17, 2026 13:15
Adds a new Pi extension with a tested no-limit Hold'em engine (deck,
hand evaluator, betting rounds, side pots), a box-drawing oval table
renderer, and WebSocket host/join networking for playing over the LAN.
Identity is just the machine hostname, and the table shows today's
token usage. /poker bots plays solo against simple bots right away;
/poker host and /poker join wire up multiplayer.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iGzsop5jB18LBJk4EtVko
Chat rides the existing host-authoritative WebSocket protocol: a new
"chat"/"chatMessage"/"chatHistory" message trio, a bounded per-room
history with replay for late joiners, and per-connection rate
limiting. Game events (blinds, folds, calls, raises, showdown) are
mirrored into the same feed as system messages, so the small terminal
panel doubles as chat and action log instead of needing two.

Chat text is rendered straight into other players' terminals, so it's
sanitized before broadcast: ANSI/OSC escape sequences and other
control characters are stripped, newlines collapsed, length capped.
Covered by dedicated sanitize + host/client integration tests.

UI: press / to open a compose line inside the table overlay, Enter to
send, Esc to cancel, without colliding with the single-key action
shortcuts (f/c/r/a).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015iGzsop5jB18LBJk4EtVko
- /poker host now requires --i-know flag; first run prints the disclaimer
  (host can see hole cards, do not use for money) instead of a modal
  we don't have a native prompt for.
- Join flow prints a trust warning before connecting.
- Client distinguishes "never connected" from "host went away mid-game"
  and surfaces a plain host-offline notice + closes the room.

Follow-ups (separate diff): display-name validation, grace-period
reconnect toast with countdown, render three cleanups.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Extract reusable sessions and runtime-neutral game logic, add a personal Cloudflare Worker with Durable Object rooms, and wire local/create/join terminal flows.
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