aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/roulette_wagers.go
blob: 7562582bf136155233dcc058a159d943d9f38cdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package casino

import "fmt"

// Roulette offers one wager per spin, but the target catalogue is the whole
// layout, so the state-based list doubles as the payout reference: every
// legal target with its profit odds and its chance (pockets out of an
// equally-likely wheel). Racetrack call bets join on tables that offer them.
func (t *rouletteTable) wagerRows() []WagerRow {
	pockets, basketOdds, basketPockets := 37, "8:1", 4
	if t.Config.Roulette.DoubleZero {
		pockets, basketOdds, basketPockets = 38, "6:1", 5
	}
	chance := func(n int) string { return fmt.Sprintf("%d/%d", n, pockets) }
	rows := []WagerRow{
		{"<number>", "35:1", "One pocket (" + chance(1) + ")"},
		{"red / black", "1:1", "The color (" + chance(18) + ")"},
		{"odd / even", "1:1", "The parity (" + chance(18) + ")"},
		{"low / high", "1:1", "Low 1-18 / high 19-36 (" + chance(18) + ")"},
		{"1to12 / 13to24 / 25to36", "2:1", "A dozen (" + chance(12) + ")"},
		{"row1 / row2 / row3", "2:1", "A numbered row (" + chance(12) + ")"},
		{"split <a> <b>", "17:1", "Two touching pockets (" + chance(2) + ")"},
		{"street <a> <b> <c>", "11:1", "Three numbers in a street (" + chance(3) + ")"},
		{"trio 0 <a> <b>", "11:1", "A zero-edge trio (" + chance(3) + ")"},
		{"corner <a> <b> <c> <d>", "8:1", "A 2x2 square (" + chance(4) + ")"},
		{"line <a> … <f>", "5:1", "Two adjoining streets (" + chance(6) + ")"},
		{"basket", basketOdds, "0, 1, 2, 3 (+ 00) (" + chance(basketPockets) + ")"},
	}
	if t.Config.Roulette.Racetrack && !t.Config.Roulette.DoubleZero {
		rows = append(rows,
			WagerRow{"voisins", "5:3 or 1:1", "17 pockets around zero, 9 chips"},
			WagerRow{"tiers", "2:1", "The 12 pockets opposite zero, 6 chips"},
			WagerRow{"orphelins", "31:5 or 13:5", "The two orphan arcs, 5 chips"},
			WagerRow{"zero / jeu zero", "8:1 or 7:2", "The 7 pockets nearest zero, 4 chips"},
			WagerRow{"neighbors <n>", "3:1", "Pocket n plus four numbers each side, 9 chips"},
		)
	}
	return rows
}