games: the plan catches up with the door and the split
The handover was still saying "only blackjack is live", which was wrong two
sessions ago and is wronger now. It records what is actually on the box (03524ae)
and what is waiting on it: the UNO redraw fix, the front door and share card, and
blackjack's split. The user has seen that list and is holding the deploy, so the
next session should ask rather than assume.
Claude-Session: https://claude.ai/code/session_013M5nD7PgUboJXoDcYHzpuJ
This commit is contained in:
@@ -69,8 +69,53 @@ guessed: **No Mercy is easier than UNO at every table size** (naive wins 46.7% v
|
||||
*bots* too, and every bot it buries is one fewer seat that can beat you to the last
|
||||
card. A deck built to be merciless is merciless mostly to the table.
|
||||
|
||||
Still un-deployed: **only blackjack is live.** The other five games (six, now, if
|
||||
you count the No Mercy dial) are on main and have never been deployed.
|
||||
### What this session did (2026-07-14, later)
|
||||
|
||||
**The casino had no share card, and meta tags would not have fixed it.** Every
|
||||
route was behind `requirePlayer`, so a link pasted into a chat window got a 302
|
||||
to sign-in and unfurled as the word "parodia.dev" — no title, no image. Tags on a
|
||||
page a stranger cannot fetch are tags nobody reads. The casino now has a **front
|
||||
door**: `/games` serves a real page to anybody, with the sign-in button and the
|
||||
six tables on it. The tables still bounce you to sign-in; you cannot play from
|
||||
the door. The **share card is drawn in Go** (`games_og.go`, `/games/og.png`,
|
||||
public) and follows the clock like everything else — Casinopolis on green felt by
|
||||
day, Casino Night Zone in neon after six — except the clock that decides is the
|
||||
*server's*, because an unfurl bot has no evening of its own. *(`7ca1f7a`)*
|
||||
|
||||
Two things from building it worth not re-learning. **`color.RGBA` is
|
||||
alpha-premultiplied**: the lamp over the table wrote raw channels beside a low
|
||||
alpha, `image/draw` ran the result past 255 and wrapped the hue, and the first
|
||||
card came out with a blue dome over a green stripe. If a colour comes out
|
||||
impossible, look for a missing premultiply. And **an `og:image` has to be an
|
||||
absolute URL that actually resolves** — which is two different addresses
|
||||
depending on how you arrived (`/og.png` on the games host, where hostRouter puts
|
||||
the `/games` back on; `/games/og.png` anywhere else). The test now reads the URL
|
||||
off the page and goes and fetches it, on both hosts.
|
||||
|
||||
**Blackjack has a split.** *(`6f34a89`)* `State.Player` is gone: there is a slice
|
||||
of `Hands`, each with its own cards, bet, outcome and payout, played left to
|
||||
right. It is the only move in the game that takes chips *after* the cards are
|
||||
out, and that is where the bugs live — `handleMove` was staking `st.Bet` for a
|
||||
double, which was the same number as the hand's bet until today and is now the
|
||||
whole table's, so doubling the third hand of a split would have charged you for
|
||||
all three. `DoubleCost`/`SplitCost` are the active hand's. Each hand is **raked
|
||||
on its own winnings**: netting them first would mean winning one and losing one
|
||||
costs no rake at all, which is a discount for splitting rather than a rake. The
|
||||
rules that cost real money if guessed: split aces get one card each and no say;
|
||||
**21 on a split hand is not a natural** and does not pay 3:2; same rank, not same
|
||||
value (K+Q is not a pair); four hands max; double after split is allowed; and if
|
||||
every hand busts the dealer never turns over. `State.UnmarshalJSON` still reads
|
||||
pre-split blobs, because a live hand outlives a deploy and a player mid-hand at
|
||||
restart would otherwise be a player whose cards vanished.
|
||||
|
||||
### Deployed, as of right now
|
||||
|
||||
The live box (`/opt/pete`) is on **`03524ae`**, and main is three commits past it.
|
||||
Undeployed: the **UNO call-uno + live hand redraw** fix (`39ed293`), the **front
|
||||
door and share card** (`7ca1f7a`), and **blackjack's split** (`6f34a89`). The UNO
|
||||
one is a bug that is live right now: your own hand doesn't redraw during a lap.
|
||||
The user has seen this list and chose to hold the deploy for now — *ask before
|
||||
assuming it went out.*
|
||||
|
||||
### Decisions taken (these close §9's open questions)
|
||||
|
||||
@@ -603,18 +648,18 @@ you count the No Mercy dial) are on main and have never been deployed.
|
||||
|
||||
### Next, in order
|
||||
|
||||
1. **Nothing is queued.** Every game in the header line is built, played, and
|
||||
deployed. What is left is the open list below — none of it blocking, none of it
|
||||
promised.
|
||||
2. The obvious candidates, in the order I'd take them: **blackjack has no split**;
|
||||
**hold'em has no multiway policy**; and the trivia bank refills on a 12h tick
|
||||
(`games: trivia bank refill started target=400`), so a player trying a ladder in
|
||||
the first minute after a fresh deploy can still meet a 503.
|
||||
1. **A deploy is owed.** Three commits are on main and not on the box (see
|
||||
"Deployed, as of right now" above), one of them a live UNO bug. Everything is
|
||||
built and browser-verified; nothing is half-done.
|
||||
2. Then the open list, none of it blocking, none of it promised: **hold'em has no
|
||||
multiway policy**; the trivia bank refills on a 12h tick (`games: trivia bank
|
||||
refill started target=400`), so a player trying a ladder in the first minute
|
||||
after a fresh deploy can still meet a 503.
|
||||
|
||||
Still open on hold'em, none of it blocking: the policy is **heads-up**, so a
|
||||
six-handed table is an approximation of it (the hit rate falls from 95% to about 17%
|
||||
at six seats, and the rest is pot odds) — a multiway policy would want its own
|
||||
training run with more than two seats in the tree. Blackjack still has no **split**.
|
||||
Still open on hold'em: the policy is **heads-up**, so a six-handed table is an
|
||||
approximation of it (the hit rate falls from 95% to about 17% at six seats, and
|
||||
the rest is pot odds) — a multiway policy would want its own training run with
|
||||
more than two seats in the tree. Blackjack's split is **done**.
|
||||
|
||||
### How the browser half fits together
|
||||
|
||||
|
||||
Reference in New Issue
Block a user