aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/casino/types.go')
-rw-r--r--internal/casino/types.go22
1 files changed, 16 insertions, 6 deletions
diff --git a/internal/casino/types.go b/internal/casino/types.go
index 2d4ba02..5efb43e 100644
--- a/internal/casino/types.go
+++ b/internal/casino/types.go
@@ -56,8 +56,8 @@ func (c BlackjackConfig) CountsDoubleSplitBlackjack() bool {
func (c BlackjackConfig) AllowsSurrender() bool { return ruleBool(c.Surrender, false) }
// AllowsUnlikeTenSplit reports whether any two 10-valued cards may split
-// (K+Q, 10+J). Standard casinos split only identical ranks, so a true value
-// (the default) is player-favourable.
+// (K+Q, 10+J). Casinos vary on whether identical ranks are required; true
+// (the default) is the more permissive setting.
func (c BlackjackConfig) AllowsUnlikeTenSplit() bool { return ruleBool(c.SplitUnlikeTenValues, true) }
func (c BlackjackConfig) Normalize() BlackjackConfig {
@@ -82,10 +82,15 @@ func (c BlackjackConfig) Normalize() BlackjackConfig {
return c
}
-// BaccaratConfig holds punto banco house rules: shoe composition and payout
-// multipliers. Banker wins pay BankerPayout:1 (a 5% commission game is 0.95);
-// tie wins pay TiePayout:1.
+// BaccaratConfig holds punto banco rules, including no-commission exceptions
+// and optional wagers. Commission tables pay BankerPayout:1 (0.95 = 5% fee);
+// no-commission variants pay even money except for their specified exception.
type BaccaratConfig struct {
+ Variant string `yaml:"variant,omitempty"` // commission, super_6, ez_baccarat
+ PairBets bool `yaml:"pair_bets,omitempty"`
+ Dragon7 bool `yaml:"dragon_7,omitempty"`
+ Panda8 bool `yaml:"panda_8,omitempty"`
+ Super6Bet bool `yaml:"super_6_bet,omitempty"`
Decks int `yaml:"decks,omitempty"`
ShuffleAt float64 `yaml:"shuffle_at,omitempty"`
TiePayout float64 `yaml:"tie_payout,omitempty"`
@@ -93,6 +98,9 @@ type BaccaratConfig struct {
}
func (c BaccaratConfig) Normalize() BaccaratConfig {
+ if c.Variant == "" {
+ c.Variant = BaccaratCommission
+ }
if c.Decks <= 0 {
c.Decks = 8
}
@@ -102,7 +110,9 @@ func (c BaccaratConfig) Normalize() BaccaratConfig {
if c.TiePayout <= 0 {
c.TiePayout = 8
}
- if c.BankerPayout <= 0 {
+ if c.Variant == BaccaratSuper6 || c.Variant == BaccaratEZ {
+ c.BankerPayout = 1
+ } else if c.BankerPayout <= 0 {
c.BankerPayout = 0.95
}
return c