aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/house_edge_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-10-03 02:16:00 -0400
committerhistoria <[not public]>2026-10-03 02:16:00 -0400
commit6232d41e5639f9c38e47b2bb65266e343ca26e8f (patch)
treead0c1676838a6c7e162d3a5c055f914016dac803 /internal/casino/house_edge_test.go
parentefccf58741ae43d9e891c6b743b146982b344ccf (diff)
downloadthehouseoficarus-6232d41e5639f9c38e47b2bb65266e343ca26e8f.tar.gz
feat: add casino_hints option and standardize casino command syntax
Diffstat (limited to 'internal/casino/house_edge_test.go')
-rw-r--r--internal/casino/house_edge_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/casino/house_edge_test.go b/internal/casino/house_edge_test.go
index 0704edc..bb9c924 100644
--- a/internal/casino/house_edge_test.go
+++ b/internal/casino/house_edge_test.go
@@ -17,9 +17,9 @@ func TestKnownHouseEdges(t *testing.T) {
bet string
want float64 // expected loss per unit stake (unrounded fraction)
}{
- {"roulette straight", TableConfig{Game: GameRoulette}, "<number>", 1.0 / 37},
+ {"roulette straight", TableConfig{Game: GameRoulette}, "NUMBER", 1.0 / 37},
{"roulette even money", TableConfig{Game: GameRoulette}, "red / black", 1.0 / 37},
- {"roulette DZ straight", TableConfig{Game: GameRoulette, Roulette: RouletteConfig{DoubleZero: true}}, "<number>", 2.0 / 38},
+ {"roulette DZ straight", TableConfig{Game: GameRoulette, Roulette: RouletteConfig{DoubleZero: true}}, "NUMBER", 2.0 / 38},
{"roulette DZ basket", TableConfig{Game: GameRoulette, Roulette: RouletteConfig{DoubleZero: true}}, "basket", 3.0 / 38},
{"craps pass", TableConfig{Game: GameCraps}, "pass", 0.014141414141414},
{"craps dontpass", TableConfig{Game: GameCraps}, "dontpass", 0.013636363636364},
@@ -108,14 +108,14 @@ func TestUnrecognizedTargetNeverInherits(t *testing.T) {
}
}
-// TestCrapsGroupedTargetsHaveRTP: the list names grouped rows (4/10, buy <n>,
+// TestCrapsGroupedTargetsHaveRTP: the list names grouped rows (4/10, buy N,
// odds pass / come). Each must resolve to a real edge, not the unknown dash.
func TestCrapsGroupedTargetsHaveRTP(t *testing.T) {
for _, bet := range []string{
"place 4/10", "place 5/9", "place 6/8",
"hard 4/10", "hard 6/8",
- "odds pass / come", "odds dont <n>",
- "buy <n>", "lay <n>",
+ "odds pass / come", "odds dont N",
+ "buy N", "lay N",
} {
got := (TableConfig{Game: GameCraps}).HouseEdge(bet)
if len(got.Parts) == 0 {
@@ -132,20 +132,20 @@ func TestCrapsGroupedTargetsHaveRTP(t *testing.T) {
// The <n> rows expand to every legal number, including the crapless extras.
for _, want := range []string{"2", "3", "11", "12"} {
found := false
- for _, part := range crapless.HouseEdge("lay <n>").Parts {
+ for _, part := range crapless.HouseEdge("lay N").Parts {
if part.Label == want {
found = true
}
}
if !found {
- t.Fatalf("crapless lay <n> missing number %s", want)
+ t.Fatalf("crapless lay N missing number %s", want)
}
}
}
// TestHopBetsTwoParts pins the split hop analysis (easy vs doubles).
func TestHopBetsTwoParts(t *testing.T) {
- got := (TableConfig{Game: GameCraps}).HouseEdge("hop <a> <b>")
+ got := (TableConfig{Game: GameCraps}).HouseEdge("hop A B")
if len(got.Parts) != 2 {
t.Fatalf("hop analysis: %s", got.Text(2))
}