aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/baccarat_wagers.go
blob: d457cdc49d25fd133a3894b79450e0c309861491 (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"

// Baccarat's wager list names every outcome and optional side bet this
// variant actually offers, with profit odds and the bare win condition.
// The no-commission exceptions travel in the payout wording so the list
// stays truthful for every edition.
func (t *baccaratTable) wagerRows() []WagerRow {
	rules := t.Rules
	banker := "0.95:1 (5% commission)"
	switch rules.Variant {
	case BaccaratSuper6:
		banker = "1:1 (Banker 6 pays 1:2)"
	case BaccaratEZ:
		banker = "1:1 (3-card 7 pushes)"
	}
	rows := []WagerRow{
		{"player", "1:1", "Player's last digit beats Banker's"},
		{"banker", banker, "Banker's last digit beats Player's"},
		{"tie", fmt.Sprintf("%g:1", rules.TiePayout), "Both hands finish equal"},
	}
	if rules.PairBets {
		rows = append(rows,
			WagerRow{"player_pair", "11:1", "First two Player cards share a rank"},
			WagerRow{"banker_pair", "11:1", "First two Banker cards share a rank"},
		)
	}
	if rules.Dragon7 {
		rows = append(rows, WagerRow{"dragon_7", "40:1", "Banker wins with a three-card 7"})
	}
	if rules.Panda8 {
		rows = append(rows, WagerRow{"panda_8", "25:1", "Player wins with a three-card 8"})
	}
	if rules.Super6Bet {
		rows = append(rows, WagerRow{"super_6", "12:1", "Banker wins with 6"})
	}
	return rows
}