From 00fe5f7ead43627fa283035b27365924b76c5a0f Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Tue, 29 Sep 2026 16:50:40 -0400 Subject: feat: roulette bets street, corner, split, etc. --- internal/game/render_roulette.go | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'internal/game/render_roulette.go') diff --git a/internal/game/render_roulette.go b/internal/game/render_roulette.go index cfded31..47ba5c6 100644 --- a/internal/game/render_roulette.go +++ b/internal/game/render_roulette.go @@ -53,13 +53,19 @@ func rouletteCenter(text string, width int) string { return strings.Repeat(" ", pad/2) + text + strings.Repeat(" ", pad-pad/2) } -type rouletteLines struct{ h, v, tl, tr, bl, br, teeTop, teeBottom, teeLeft, teeRight, cross string } +type rouletteLines struct { + h, v, tl, tr, bl, br, teeTop, teeBottom, teeLeft, teeRight, cross string + // zeroTL/zeroBL are the zero lane's outer corners. They are rounded while + // the rest of the board keeps square joints, so the tall green zero panel + // reads as a soft-edged block without disturbing the grid's connections. + zeroTL, zeroBL string +} func rouletteBorders(unicode bool) rouletteLines { if unicode { - return rouletteLines{"─", "│", "┌", "┐", "└", "┘", "┬", "┴", "├", "┤", "┼"} + return rouletteLines{"─", "│", "┌", "┐", "└", "┘", "┬", "┴", "├", "┤", "┼", "╭", "╰"} } - return rouletteLines{"-", "|", "+", "+", "+", "+", "+", "+", "+", "+", "+"} + return rouletteLines{"-", "|", "+", "+", "+", "+", "+", "+", "+", "+", "+", "+", "+"} } func repeatRoulette(s string, n int) []string { @@ -97,7 +103,7 @@ func renderRouletteLayout(double bool, mode string, unicode bool) string { // everywhere else. gridBottom := func() string { var sb strings.Builder - sb.WriteString(b.bl) + sb.WriteString(b.zeroBL) for col := 6; col <= 66; col += 5 { if col == 6 { sb.WriteString(strings.Repeat(b.h, 5)) @@ -115,7 +121,7 @@ func renderRouletteLayout(double bool, mode string, unicode bool) string { sb.WriteString(b.br) return sb.String() } - lines = append(lines, rouletteInk(mode, gridRule(b.tl, b.teeTop, b.tr))) + lines = append(lines, rouletteInk(mode, gridRule(b.zeroTL, b.teeTop, b.tr))) for row := 3; row >= 1; row-- { zero := "" switch { @@ -144,7 +150,9 @@ func renderRouletteLayout(double bool, mode string, unicode bool) string { line += rouletteInk(mode, rouletteCenter(fmt.Sprintf("row%d", 4-row), rowCell)+b.v) lines = append(lines, line) if row > 1 { - line = rouletteInk(mode, b.v+" "+b.teeLeft+ + // The zero lane is one green rectangle, so the two separator rows + // are painted to match the cells above and below them. + line = rouletteInk(mode, b.v) + roulettePaint(mode, " ", 2) + rouletteInk(mode, b.teeLeft+ strings.Join(repeatRoulette(strings.Repeat(b.h, 4), 12), b.cross)+ b.cross+strings.Repeat(b.h, rowCell)+b.teeRight) lines = append(lines, line) @@ -428,9 +436,10 @@ func renderRouletteResult(pockets [3]string, mode string, unicode bool, size int // rouletteReminder is the odds/cheat-sheet block, shown only by "table" (and // "table rules"), never with the ambient betting board. func (g *Game) rouletteReminder(sess *net.Session) string { - text := "Numbers 35:1 | 1to12 / 13to24 / 25to36 and rows 2:1 | Other outside bets 1:1\n" + + text := "Numbers 35:1 | Split 17:1 | Street/trio 11:1 | Corner 8:1 | Line 5:1 | Dozens & rows 2:1 | Outside 1:1\n" + + "Combos: split 1 2 | street 1 2 3 | corner 1 2 4 5 | line 1 2 3 4 5 6 | trio 0 1 2 | basket (double zero)\n" + "Low: 1-18 | High: 19-36 | Zero loses all outside bets\n" + - "bet 10 on 17 / bet 10 on red / bet 10 on 13to24" + "bet 10 on 17 / bet 10 on red / bet 10 on split 1 2" return g.colorize(sess, "casino_action", text) } -- cgit v1.2.3