diff options
Diffstat (limited to 'internal/casino/slots.go')
| -rw-r--r-- | internal/casino/slots.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/internal/casino/slots.go b/internal/casino/slots.go index 5c387c8..aba8f91 100644 --- a/internal/casino/slots.go +++ b/internal/casino/slots.go @@ -37,18 +37,6 @@ type SlotWin struct { Payout float64 } -// slotResult preserves the small rules-engine hook used by the unfinished -// generic table implementation while slots move onto SlotMachine. -type slotSpin struct { - Display string - Payout int -} - -func slotResult(rng *rand.Rand, bet int) slotSpin { - spin := generateSlotSpin(rng, bet) - return slotSpin{Display: spin.render(5), Payout: int(math.Floor(spin.Payout + 0.5))} -} - func DefaultHuffAndPuffProfile() SlotProfile { return SlotProfile{ Rows: 3, Reels: 5, Ways: 243, @@ -92,10 +80,6 @@ func (p SlotProfile) symbol(id string) *SlotSymbol { return nil } -func generateSlotSpin(rng *rand.Rand, bet int) *SlotSpin { - return generateSlotSpinWithProfile(rng, bet, DefaultHuffAndPuffProfile()) -} - func generateSlotSpinWithProfile(rng *rand.Rand, bet int, profile SlotProfile) *SlotSpin { p := profile.Normalize() spin := &SlotSpin{} @@ -175,24 +159,6 @@ func matchingLength(grid [3][5]string, symbol string) (int, int) { return length, ways } -func (s *SlotSpin) render(stoppedReels int) string { - var out string - out += "+---------+---------+---------+---------+---------+\n" - for row := 0; row < 3; row++ { - out += "|" - for reel := 0; reel < 5; reel++ { - value := "..." - if reel < stoppedReels { - value = s.Grid[row][reel] - } - out += fmt.Sprintf(" %-7s |", value) - } - out += "\n" - } - out += "+---------+---------+---------+---------+---------+" - return out -} - // CalculateRTP returns the exact mathematical RTP for the independent-cell // model used by the baseline machine, before integer-credit rounding. func CalculateRTP(profile SlotProfile) float64 { |
