games: the solitaire table gets played, and blackjack still pays

This commit is contained in:
prosolis
2026-07-14 01:57:03 -07:00
parent 5ca056bf20
commit feb353f789

View File

@@ -226,18 +226,27 @@ A multi-session build. This section is the handover; read it before anything els
blackjack.js) and **`PeteFX.spot()`** (the pile of chips and the number under blackjack.js) and **`PeteFX.spot()`** (the pile of chips and the number under
it, which owns the "the number is a readout of the pile" rule so no table can it, which owns the "the number is a readout of the pile" rule so no table can
break it). Blackjack now uses both. break it). Blackjack now uses both.
- **NOT YET DRIVEN IN A BROWSER.** Everything compiles and every Go test passes, - **Driven in a browser, 2026-07-14, and it holds up.** Every worry on the list
but per this plan's own hard-won rule, *that means nothing about the table*. came back clean. A Patient deck bought for 200 dealt a correct Klondike (28 cards
Next session: `PETE_DEV_CASINO=:7788 go test ./internal/web -run TestDevCasino across the seven columns, 24 left in the stock), quoted `+5.4 a card` and `38 more
-timeout 0` and play it. Watch especially: the seven columns fitting on a phone to break even` — which is the tier's arithmetic, not a guess — and the money
(`--card-w` is a clamp on vw), the FLIP not jumping on a re-render, the rail not conserved end to end: 5,000 → 4,800 to buy the deck → one card home banked 5 →
colliding with anything, and **blackjack still settling correctly** — its money 4,805 cashed out. The FLIP does not jump on a re-render. The seven columns fit at
was rewired onto the shared spot and it is the thing most likely to have broken. 390px with no horizontal overflow (`docScrollW == clientW`), the rail stacks under
the board rather than colliding with it, and the console is silent.
- **And blackjack survived the rewire**, which was the real thing to check. Five
hands, and the felt agreed with `/api/games/table` on every one. The rake still
comes out of winnings only: a 400 win paid back 780 (the stake, plus 400 less 5%),
and a push returned all 600 with nothing taken.
- One thing to know before you go looking for a bug that isn't there: the bare
`<span data-chip>` elements are the *house rack's decoration*. Only
`button[data-chip]` carries a listener. A driver script that clicks `[data-chip]`
hits the rack, nothing happens, and it looks like the bet is broken. Blackjack's
action buttons are also `[data-move="stand"]`, not `[data-stand]`.
### Next, in order ### Next, in order
1. **Drive solitaire in a browser** (see above) — it has never been played. 1. Phase 2's other half: **trivia**. Decided but not built: the question bank is
2. Phase 2's other half: **trivia**. Decided but not built: the question bank is
**prefetched from OpenTDB into a local table** (a per-question fetch in a web **prefetched from OpenTDB into a local table** (a per-question fetch in a web
game loop is a latency and rate-limit problem gogobee never had), through game loop is a latency and rate-limit problem gogobee never had), through
`internal/safehttp`. It stakes chips too. The shape that fits the room is a `internal/safehttp`. It stakes chips too. The shape that fits the room is a