aboutsummaryrefslogtreecommitdiff
path: root/building_guide
diff options
context:
space:
mode:
Diffstat (limited to 'building_guide')
-rw-r--r--building_guide/roulette.md43
1 files changed, 29 insertions, 14 deletions
diff --git a/building_guide/roulette.md b/building_guide/roulette.md
index 3960e2b..10c68ce 100644
--- a/building_guide/roulette.md
+++ b/building_guide/roulette.md
@@ -29,8 +29,21 @@ spinning finishes.
Art is rendered per recipient in `internal/game/render_roulette.go`, so color
mode and Unicode preference stay per player (the engine snapshot never embeds
-ANSI). Three views share one renderer:
-
+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.
+ 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
+ survives round resets but not table replacement or server restart.
+ 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
+ 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
pockets, and outside bets. The whole five-row zero lane (three numbered rows
plus the two separators between them) carries the green background, and its
@@ -42,18 +55,20 @@ ANSI). Three views share one renderer:
Orphelins; Zero has a curved boundary within Voisins. Neighbors is not
drawn on the board, but remains in the payout reference and help.
- **Spinning**: a stylised 17x9 wheel (wider than tall so it reads as a circle
- in a terminal cell grid). Only the rim is colored, as solid red and black
- pockets alternating around the circumference; pockets are two cells wide
- except the top and bottom centres, which stay one cell. One pocket is green
- (plus its diametrically opposite pocket on American wheels). A simple plus
- marks the croupier's spindle. No pocket numbers are drawn; with color off
- the pockets fall back to R/B/G so the wheel still reads.
-- **Result**: the winning pocket plus its two physical wheel neighbours at
- playing-card size. The pocket number sits on the top row, a rule separates
- it from the ball (one row above centre), and the color name is spelled out
- on the bottom row only when color is off. There is no surrounding prose.
- The smallest (five-row) cards drop the rule so the ball can sit directly
- under the number.
+ 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
+ pure black vanishes on dark terminals. Pockets are two cells wide except the
+ top and bottom centres, which stay one cell. One pocket is green (plus its
+ diametrically opposite pocket on American wheels). A simple plus marks the
+ croupier's spindle. No pocket numbers are drawn; with color off the pockets
+ fall back to R/B/G so the wheel still reads.
+- **Result**: the winning pocket plus two physical wheel neighbours on each
+ side (five cards) at playing-card size. The pocket number sits on the top row,
+ a rule separates it from the ball (one row above centre), and the color name
+ is spelled out on the bottom row only when color is off. There is no
+ surrounding prose. The smallest (five-row) cards drop the rule so the ball
+ can sit directly under the number. The wheel and result graphics each get a
+ blank line before and after so they do not crowd the prose.
The colored payout tables in `internal/game/render_casino_help.go` use the
shared ANSI-aware `ui.Table` renderer, respecting ASCII/Unicode and wrap width.