aboutsummaryrefslogtreecommitdiff
path: root/internal/game/render_roulette.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-29 16:50:40 -0400
committerhistoria <[not public]>2026-09-29 16:50:40 -0400
commit00fe5f7ead43627fa283035b27365924b76c5a0f (patch)
tree07546518a51aaa037d64813f40eb6dc4596bd9cb /internal/game/render_roulette.go
parentbfe22e10b5b9f2c7039d1d67021229659a06a226 (diff)
downloadthehouseoficarus-00fe5f7ead43627fa283035b27365924b76c5a0f.tar.gz
feat: roulette bets street, corner, split, etc.
Diffstat (limited to 'internal/game/render_roulette.go')
-rw-r--r--internal/game/render_roulette.go25
1 files changed, 17 insertions, 8 deletions
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)
}