games: the ladder gets played, and the rack learns where to stand

Trivia had every Go test passing and had never been in a browser, which
this plan's own rule says means nothing. So: play it.

The game itself holds up. The clock drains honestly and does not restart
on a reload, the multiple compounds, walking pays exactly what the felt
quoted, the reveal marks the right answer, and the auto-submit at zero
lands as a timeout rather than an illegal move. The next question's
answer never crosses the wire.

Two bugs only the browser could show:

- The spot printed double the stake after every settled game. standing()
  set spot.amount and *then* poured the chips on, and pour grows the pile
  from what it is told is already there. The money was always right; the
  number under the chips was not, which is the one rule the felt is built
  on.

- The house rack sat on top of the multiplier at 390px. Its 5.75rem inset
  is not a margin, it is the width of blackjack's shoe — so on a phone the
  rack sits in the middle of the felt. It now shrinks on small screens and
  pulls into the corner where the corner is empty; data-at says which rack
  is which, because pulling blackjack's to the edge slides it under the
  deck.

The dev rig seeds its own question bank now (one real OpenTDB batch per
difficulty), because a fresh dev database 503s every start otherwise.
This commit is contained in:
prosolis
2026-07-14 02:33:28 -07:00
parent c62d736223
commit 2d653bf439
7 changed files with 119 additions and 29 deletions

View File

@@ -860,6 +860,26 @@ html[data-phase="night"] {
.pete-rack span[data-chip="100"] { --chip: #2b2118; }
.pete-rack span[data-chip="500"] { --chip: #b079d6; }
/* On a phone the rack has to get out of the way. At its desk size it is a
147px block sitting 92px in from the edge — a corner on a wide felt, but the
middle of the table on a 390px one, where it sat on top of trivia's
multiplier. So on a small screen it gets smaller, and where there's nothing
in the corner it pulls into the corner.
Where the rack sits is the one thing that differs per table, which is what
data-at says. Unmarked, it's alone in the corner. "shoe" means blackjack,
where the 5.75rem inset is not a margin but the width of the shoe it sits
beside — pull that one to the edge and it slides under the deck. "rail" means
solitaire, where the rack isn't on the felt at all (position: static). */
@media (max-width: 639px) {
.pete-rack:not([data-at="rail"]) {
gap: 0.25rem;
padding: 0.35rem 0.4rem 0.3rem;
}
.pete-rack:not([data-at="rail"]) span { width: 1.15rem; }
.pete-rack:not([data-at]) { right: 1rem; }
}
/* The burst. A natural gets confetti; nothing else in the room does, which is
what keeps it worth something. */
.pete-spark {

File diff suppressed because one or more lines are too long

View File

@@ -278,7 +278,10 @@
}
bet = amount;
showBet();
spot.amount = amount;
// pour grows the pile from whatever is on the spot, and settle has just swept
// it clean — so it must not be told the chips are already there. Setting the
// amount first counted the standing bet twice, and the spot printed 400 under
// a 200 stake.
return spot.pour(purseEl, amount);
}