From 55eb569d3b366a6015b620044606e4b6e3fe48c5 Mon Sep 17 00:00:00 2001 From: JoshHeaps Date: Wed, 2 Sep 2026 08:37:44 -0600 Subject: [PATCH] Keep the list of who's next, instead of leaving it on a napkin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A full home game always has two or three people standing behind the chairs, and the list of who's next lives on a napkin or in the dealer's head. That is where the argument an hour later comes from. The tool had just learned to open a chair — somebody cashes out and the seat is free — and had nothing to say about who should sit in it. The Session panel keeps the list in order of arrival, which is the only ordering anybody has ever agreed to. Whoever is at the front is offered the first open chair by number, and everybody else waits their turn: a list that isn't kept in order is a pile of names, and jumping the queue is the thing a dealer gets shouted at for. With the table full it says so rather than offering a seat that doesn't exist. The same offer appears on the empty chair's own menu — "Seat Priya" — because tapping the chair somebody is about to sit in is what a dealer's hand does anyway. Sitting somebody down puts their name on the chair and nothing else. No stack, no buy-in, not dealt in: they haven't paid yet, and inventing chips for them would put money on the table nobody has handed over, which is the one thing the bank check exists to catch. Add chips is the next thing the dealer does, and it is one tap away in the same menu. Two people called Mike are two people — the list is keyed by id, not by name. Names are trimmed, blanks are refused, and a saved list from a table that never had one comes back empty rather than undefined. 15 new tests, with the occupied-chair guard removed and a stack handed to the new player on purpose to confirm they fail. Walked through the browser: two names added to a full table, a player cashed out to open seat 2, the front of the queue seated there with nothing in front of them, the bank still balanced, and the second name taken off the list. 156 audits with the list populated, including a name long enough to test the row. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb --- JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml | 8 + JoshHeaps.Net/wwwroot/css/casino/holdem.css | 80 +++++++++ .../wwwroot/js/casino/holdem/main.js | 39 ++++ .../wwwroot/js/casino/holdem/render.js | 54 ++++++ .../wwwroot/js/casino/holdem/seatMenu.js | 15 ++ .../wwwroot/js/casino/holdem/state.js | 67 +++++++ tests/holdem/waitingList.test.js | 167 ++++++++++++++++++ 7 files changed, 430 insertions(+) create mode 100644 tests/holdem/waitingList.test.js diff --git a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml index 7a65cbb..ad5b098 100644 --- a/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml +++ b/JoshHeaps.Net/Pages/Casino/TexasHoldem.cshtml @@ -146,6 +146,14 @@

Everyone who has bought in shows up here, with what they'd be owed if the night ended now.

+

Waiting list

+
+ + +
+
    +

    Nobody waiting. Add the people standing behind the chairs, and the tool will offer them the next seat that opens.

    +