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