aboutsummaryrefslogtreecommitdiff
path: root/internal/casino/slots_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-08-03 14:08:09 -0400
committerhistoria <[not public]>2026-08-03 14:08:09 -0400
commit612e429de438821ae8e099d6b54f87c11ff6c1b5 (patch)
treead6f9edf74339b9b50f9c7c2cd314ee7b6e04b2c /internal/casino/slots_test.go
parentf51424c90dbce7191a31b6e675818c985f0f4539 (diff)
downloadthehouseoficarus-612e429de438821ae8e099d6b54f87c11ff6c1b5.tar.gz
refactor: casino game slop refactor
Diffstat (limited to 'internal/casino/slots_test.go')
-rw-r--r--internal/casino/slots_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/casino/slots_test.go b/internal/casino/slots_test.go
index 22e39bf..47754dc 100644
--- a/internal/casino/slots_test.go
+++ b/internal/casino/slots_test.go
@@ -28,6 +28,21 @@ func TestScaleToRTP(t *testing.T) {
}
}
+func TestEvaluateSlotHonorsProfileWays(t *testing.T) {
+ profile := SlotProfile{Rows: 3, Reels: 5, Ways: 1,
+ Symbols: []SlotSymbol{{ID: "x", Weight: 1, Payout: map[int]float64{5: 2}}}}
+ grid := [3][5]string{}
+ for row := range grid {
+ for reel := range grid[row] {
+ grid[row][reel] = "x"
+ }
+ }
+ payout, _ := evaluateSlot(grid, 10, profile)
+ if payout != 4860 {
+ t.Fatalf("payout=%v, want 4860 (bet 10 x 2 x 243 ways / 1)", payout)
+ }
+}
+
func TestEvaluateSlotReportsWinningWays(t *testing.T) {
profile := SlotProfile{Rows: 3, Reels: 5, Ways: 243,
Symbols: []SlotSymbol{{ID: "x", Weight: 1, Payout: map[int]float64{5: 2}}}}