games: the casino moves out, and gets a clock of its own

The tables were living in the news app's shell: Pete's face in the header
and the footer, the channel nav, search, the reader, the weather canvas,
the PWA. A casino is not a news page with a felt on it.

So it gets its own layout. What carries over is the design language — the
four palette vars, Fredoka/Nunito, the fat rounded cards, the dropped
shadow. What doesn't is every control it has no use for. gamesPage stops
embedding the news pageData, which is what keeps the furniture from
drifting back one convenient field at a time.

It keeps a clock, but tells a different joke with it: Casinopolis by day,
Casino Night Zone from six, palette and felt and the sign over the door all
changing together. The rule lives in roomAt() for the first paint and again
in the browser, so a player abroad gets their own evening.

And the cards are cards now — corner indices in both corners, the bottom
one upside down as printed, pips on the three-by-seven grid every real deck
has used for four hundred years, courts as a letter with the suit over each
shoulder. Driven in a real browser, both rooms, dealt through to a payout.
This commit is contained in:
prosolis
2026-07-13 23:40:33 -07:00
parent c69fbb63db
commit 8ec13eab5b
10 changed files with 538 additions and 52 deletions

View File

@@ -19,9 +19,20 @@ A multi-session build. This section is the handover; read it before anything els
in flight, so it can't be cleared by firing several requests at once.
- **A house rake**, 5% in blackjack's `DefaultRules`, taken from *winnings only*
never the stake. A push returns the bet untouched; a loss is never charged a fee.
- **The site must look like Pete.** Same cute, bubbly interface: `layout.html`,
Fredoka/Nunito, the CSS vars, `rounded-3xl` cards, `shadow-pete`. Not a
separate-looking SPA bolted onto the same box.
- **The site shares Pete's design, not Pete's shell.** *(Revised 2026-07-13 — this
replaces the earlier "the site must look like Pete", which meant `layout.html`
itself.)* The casino is its own place. It takes the design language — Fredoka/
Nunito, the four palette vars, `rounded-3xl`, `shadow-pete`, the bubbly weight of
everything — and takes none of the furniture: no Pete avatar, no channel nav, no
search, no reader, no settings, no weather canvas, no PWA. It has its own layout
(`games_layout.html`), its own header, its own footer, its own scripts. Still not
an SPA; still server-rendered `html/template`.
- **It has two names, on a clock.** Casinopolis by day, Casino Night Zone from six
in the evening — palette, felt and the sign over the door all change together.
This is the news app's phase system pointed at a joke: one `data-room` attribute,
two palette blocks, and a rule shared between `roomAt()` in Go (first paint) and
the same rule in JS (the player's own clock, so a player abroad gets their own
evening).
- **Dealing is animated.** Cards visibly dealt and flipped, chips that move. This is
a requirement, not polish to drop when the clock runs out.
@@ -70,13 +81,21 @@ A multi-session build. This section is the handover; read it before anything els
animation. Driven in a real browser: chips staked before the deal, hole card withheld
from the payload until the reveal, payout settled back into the stack.
- **The casino moved out.** Its own layout (`games_layout.html`), parsed as its own
template set alongside the news one; `gamesPage` no longer embeds the news
`pageData`, which is what stops the old furniture drifting back one convenient
field at a time. Two rooms on a clock (above), the felt reupholstered from the
room's vars, and a house mark that is a honeycomb chip rather than a face.
- **The cards are cards.** Corner indices in both corners (the bottom one upside
down, as printed), pips laid out on the three-by-seven grid a real deck uses,
bottom-half pips inverted, courts as a letter with the suit over each shoulder,
and a screen-reader label that says "Queen of hearts" instead of "Q♥".
### Next, in order
1. **Make the table lively.** The mechanics are all there and the dealing animates, but
the presentation is thin: card faces are a rank and a small suit (no pips, no corner
indices), chips never physically move, and nothing celebrates. This is a *stated
requirement*, not polish — see the decisions above. Ideas already sketched: chips that
fly to a bet spot and back on a win, cards landing with weight, a dealer beat before
1. **Finish making the table lively.** Card faces are done. Still thin: chips never
physically move, and nothing celebrates. Ideas already sketched: chips that fly to
a bet spot and back on a win, cards landing with weight, a dealer beat before
drawing out, a burst on a natural.
2. **Deploy.** Add the `games.parodia.dev` redirect URI to the `pete` app in Authentik,
point Caddy at the same port, set `[web.games]` + `web.auth.cookie_domain` on the