aboutsummaryrefslogtreecommitdiff
path: root/building_guide
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-30 03:55:37 -0400
committerhistoria <[not public]>2026-09-30 03:55:37 -0400
commit735428f0667f67c12fdf3caca872d7dc65e2ce26 (patch)
tree92c9931f223bfd50ced4f1954130d879640a435b /building_guide
parentffc7b582e9c14fdc2e579b9239b5ff7ad9a0d90a (diff)
downloadthehouseoficarus-735428f0667f67c12fdf3caca872d7dc65e2ce26.tar.gz
feat: restyle roulette presentation
Diffstat (limited to 'building_guide')
-rw-r--r--building_guide/roulette.md33
1 files changed, 27 insertions, 6 deletions
diff --git a/building_guide/roulette.md b/building_guide/roulette.md
index 10c68ce..e3794e2 100644
--- a/building_guide/roulette.md
+++ b/building_guide/roulette.md
@@ -32,8 +32,10 @@ mode and Unicode preference stay per player (the engine snapshot never embeds
ANSI). The views and betting tracker share one snapshot renderer:
- **Tracker**: a five-line, 74-column strip above the betting board, rendered
- by `render_roulette_tracker.go`. It shows the latest eight hits (newest first),
- three hot/cold pockets with hit counts, and red/black/zero percentages.
+ by `render_roulette_tracker.go`. The betting snapshot leads with a blank line
+ so the tracker is separated from the prose or menu that precedes it. It shows
+ the latest eight hits (newest first), three hot/cold pockets with hit counts,
+ and red/black/zero percentages.
All stats use a table-local rolling window of 50 completed spins. Zeros are
included in the denominator; ties use numeric order (0, 00, 1, ...).
History is copied into snapshots, never sampled before settlement, and
@@ -41,7 +43,7 @@ ANSI). The views and betting tracker share one snapshot renderer:
History is copied into snapshots, never sampled before settlement, and
survives round resets but not table replacement or server restart.
- **Snapshot cadence**: the board and tracker are drawn once per round by the
- menu event (on join and after settlement, the "Next spin" menu) and by an
+ betting menu (on join and after settlement) and by an
explicit `table`/`table rules`. Placing a wager only confirms the wager; it
does not re-send the board snapshot.
- **Betting board**: numbered grid with zeros in the left lane, red/black
@@ -51,9 +53,18 @@ ANSI). The views and betting tracker share one snapshot renderer:
`renderRouletteRacetrack` above the board: a numbered oval in physical
clockwise wheel order, with 26 at the right tip. Interior dividers meet
each call bet's pockets, left to right: Tiers du Cylindre, Orphelins,
- Voisins du Zero, Zero. Connected box-drawing steps separate Tiers from
- Orphelins; Zero has a curved boundary within Voisins. Neighbors is not
- drawn on the board, but remains in the payout reference and help.
+ Voisins du Zero, Zero. Labels are centered on the middle row; a label too
+ wide to leave a blank cell against its dividers wraps onto the rows above
+ and below it (e.g. "Tiers du" / "Cylindre"), and only the glyphs are
+ written so the centering padding never paints over the dividers. Connected
+ box-drawing steps separate Tiers from Orphelins; Zero has a curved boundary
+ within Voisins. Neighbors is not drawn on the board, but remains in the
+ payout reference and help.
+- **Menu ordering**: the roulette betting menu prints its balance and
+ heading, then the tracker and board, and only then the wager reminder
+ (`bet <amount> on <target>`, `bet / rebet`, `table / sitout / stop`) so the
+ instructions follow the table they describe. Other games keep their menu
+ above the snapshot.
- **Spinning**: a stylised 17x9 wheel (wider than tall so it reads as a circle
in a terminal cell grid). Only the rim is colored: solid red pockets alternate
with a very dark blue that stands in for black (`rouletteWheelBlack`), because
@@ -115,6 +126,16 @@ Failures leave the stake pending and do not claim that payment succeeded.
Shutdown and eviction refund outstanding stakes and reset the round.
Disconnect refunds are safe because no partial outcome is sampled or exposed.
+Settlements are rendered by `settlementText` in `internal/casino/table_ux.go`:
+a colored win/loss/push headline gives the round's net once (the old
+"Net ... | ... returned (stake included)" split is gone), then each named bet
+— a blackjack hand, insurance, or the table's spot — is listed with its own
+net. Wins are green, losses red, pushes white, and a natural keeps the jackpot
+gradient. The engine emits inline color tags (`{casino_result_win}WIN{/}`),
+which `Game.casinoProse` expands per recipient against the session palette, so
+the engine still never embeds ANSI. Casino prose defaults to white
+(`casino_action`), leaving color for emphasized outcomes.
+
## Assessment and boundaries
This is a sound foundation for more testing-stage table games, not a blanket