diff options
Diffstat (limited to 'internal/casino/house_edge_test.go')
| -rw-r--r-- | internal/casino/house_edge_test.go | 16 |
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)) } |
