diff --git a/game/slot/agt/aislot/aislot_rule.go b/game/slot/agt/aislot/aislot_rule.go index 76e141a..65881ab 100644 --- a/game/slot/agt/aislot/aislot_rule.go +++ b/game/slot/agt/aislot/aislot_rule.go @@ -28,8 +28,6 @@ var BetLines = slot.BetLinesAgt5x3[:15] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -41,7 +39,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -107,27 +104,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/agt/aladdin/aladdin_rule.go b/game/slot/agt/aladdin/aladdin_rule.go index c8a7d8a..f58a35e 100644 --- a/game/slot/agt/aladdin/aladdin_rule.go +++ b/game/slot/agt/aladdin/aladdin_rule.go @@ -27,8 +27,6 @@ var BetLines = slot.BetLinesAgt5x4[:100] type Game struct { slot.Slot5x4 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -40,7 +38,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -123,27 +120,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/agt/iceiceice/iceiceice_calc.go b/game/slot/agt/iceiceice/iceiceice_calc.go index 50ca198..adb820a 100644 --- a/game/slot/agt/iceiceice/iceiceice_calc.go +++ b/game/slot/agt/iceiceice/iceiceice_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 20 // set free spins mode + g.FSR = 20 // set free spins mode var s slot.Stat var dur = slot.ScanReels3x(ctx, &s, g, reels, diff --git a/game/slot/agt/iceiceice/iceiceice_rule.go b/game/slot/agt/iceiceice/iceiceice_rule.go index 60c1035..8e4b421 100644 --- a/game/slot/agt/iceiceice/iceiceice_rule.go +++ b/game/slot/agt/iceiceice/iceiceice_rule.go @@ -33,8 +33,6 @@ var BetLines = []slot.Linex{ type Game struct { slot.Slot3x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -46,7 +44,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -56,7 +53,7 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { for li := 1; li <= g.Sel; li++ { var line = BetLines[li-1] - if g.FS > 0 { + if g.FSR > 0 { var numl slot.Pos = 3 var syml slot.Sym var x slot.Pos @@ -84,7 +81,7 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { XY: line, // whole line is used }) } - } else { // g.FS == 0 + } else { // g.FSR == 0 var numl slot.Pos = 3 var syml = screen.Pos(1, line) var x slot.Pos diff --git a/game/slot/agt/icequeen/icequeen_rule.go b/game/slot/agt/icequeen/icequeen_rule.go index d5dde91..6f24542 100644 --- a/game/slot/agt/icequeen/icequeen_rule.go +++ b/game/slot/agt/icequeen/icequeen_rule.go @@ -28,8 +28,6 @@ var BetLines = slot.BetLinesAgt5x3[:] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -41,7 +39,6 @@ func NewGame() *Game { Sel: 5, Bet: 1, }, - FS: 0, } } @@ -85,7 +82,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -98,7 +95,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -117,7 +114,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -133,7 +130,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -141,27 +138,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/agt/infinitygems/infinitygems_calc.go b/game/slot/agt/infinitygems/infinitygems_calc.go index 0ac6689..6faea7d 100644 --- a/game/slot/agt/infinitygems/infinitygems_calc.go +++ b/game/slot/agt/infinitygems/infinitygems_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 50 // set free spins mode + g.FSR = 50 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/agt/infinitygems/infinitygems_rule.go b/game/slot/agt/infinitygems/infinitygems_rule.go index d04ad0c..8b7f293 100644 --- a/game/slot/agt/infinitygems/infinitygems_rule.go +++ b/game/slot/agt/infinitygems/infinitygems_rule.go @@ -34,8 +34,6 @@ var BetLines = slot.BetLinesAgt5x3[:20] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -47,7 +45,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -127,7 +124,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -135,27 +132,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/agt/suncity/suncity_calc.go b/game/slot/agt/suncity/suncity_calc.go index 55ad0e1..2d6dac0 100644 --- a/game/slot/agt/suncity/suncity_calc.go +++ b/game/slot/agt/suncity/suncity_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) (rtp, num float64) { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = -1 // set free spins mode + g.FSR = -1 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/agt/suncity/suncity_rule.go b/game/slot/agt/suncity/suncity_rule.go index bf5d98b..66aabaa 100644 --- a/game/slot/agt/suncity/suncity_rule.go +++ b/game/slot/agt/suncity/suncity_rule.go @@ -1,5 +1,7 @@ package suncity +// See: https://demo.agtsoftware.com/games/agt/suncity + import ( "github.com/slotopol/server/game/slot" ) @@ -22,12 +24,10 @@ var LinePay = [13][5]float64{ } // Bet lines -var BetLines = slot.BetLinesAgt5x3[:20] +var BetLines = slot.BetLinesAgt5x3[:30] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -39,7 +39,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -114,7 +113,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -123,27 +122,25 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { + if g.FSR != 0 { g.Gain += wins.Gain() + g.FSN++ } else { g.Gain = wins.Gain() + g.FSN = 0 } for _, wi := range wins { if wi.Free != 0 { - if g.FS != 0 { - g.FS = 0 // stop free games + if g.FSR != 0 { + g.FSR = 0 // stop free games } else { - g.FS = -1 // start free games + g.FSR = -1 // start free games } } } } -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/agt/valkyrie/valkyrie_calc.go b/game/slot/agt/valkyrie/valkyrie_calc.go index 86b43e7..cfa7974 100644 --- a/game/slot/agt/valkyrie/valkyrie_calc.go +++ b/game/slot/agt/valkyrie/valkyrie_calc.go @@ -45,7 +45,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode var s slot.Stat var ctx2, cancel2 = context.WithCancel(ctx) diff --git a/game/slot/agt/valkyrie/valkyrie_rule.go b/game/slot/agt/valkyrie/valkyrie_rule.go index 1341af5..3f58925 100644 --- a/game/slot/agt/valkyrie/valkyrie_rule.go +++ b/game/slot/agt/valkyrie/valkyrie_rule.go @@ -30,8 +30,6 @@ var BetLines = slot.BetLinesAgt5x3[:30] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -43,7 +41,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -119,7 +116,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { func (g *Game) Spin(screen slot.Screen, mrtp float64) { var reels, _ = slot.FindReels(ReelsMap, mrtp) - if g.FS == 0 { + if g.FSR == 0 { screen.Spin(reels) } else { var reel []slot.Sym @@ -143,27 +140,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/agt/wizard/wizard_rule.go b/game/slot/agt/wizard/wizard_rule.go index b997a52..76a6d50 100644 --- a/game/slot/agt/wizard/wizard_rule.go +++ b/game/slot/agt/wizard/wizard_rule.go @@ -29,8 +29,6 @@ var BetLines = slot.BetLinesAgt5x4[:50] type Game struct { slot.Slot5x4 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -42,7 +40,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -124,27 +121,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/aristocrat/indiandreaming/indiandreaming_calc.go b/game/slot/aristocrat/indiandreaming/indiandreaming_calc.go index aae7c88..a6dadab 100644 --- a/game/slot/aristocrat/indiandreaming/indiandreaming_calc.go +++ b/game/slot/aristocrat/indiandreaming/indiandreaming_calc.go @@ -12,7 +12,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var reels, _ = slot.FindReels(ReelsMap, mrtp) var g = NewGame() var sln float64 = 25 - g.FS = 12 // set free spins mode + g.FSR = 12 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/aristocrat/indiandreaming/indiandreaming_rule.go b/game/slot/aristocrat/indiandreaming/indiandreaming_rule.go index 574f75d..1d06900 100644 --- a/game/slot/aristocrat/indiandreaming/indiandreaming_rule.go +++ b/game/slot/aristocrat/indiandreaming/indiandreaming_rule.go @@ -27,8 +27,6 @@ var ScatPay = [5]float64{0, 0, 2, 15, 100} // 2 scatter type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -40,7 +38,6 @@ func NewGame() *Game { Sel: 25, Bet: 1, }, - FS: 0, } } @@ -56,7 +53,7 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { // Lined symbols calculation. func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { var mwm float64 = 1 // mult wild mode - if g.FS > 0 { + if g.FSR > 0 { mwm = 5 } var line slot.Linex @@ -129,7 +126,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { var sn, wn = screen.ScatNum(scat), screen.ScatNum(wild) if count := sn + wn; count >= 3 { var mw float64 = 1 // mult wild - if g.FS > 0 && wn > 0 { + if g.FSR > 0 && wn > 0 { mw = 5 } var pay = ScatPay[count-1] @@ -151,27 +148,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return slot.ErrNoFeature } diff --git a/game/slot/aristocrat/redroo/redroo_calc.go b/game/slot/aristocrat/redroo/redroo_calc.go index 583c16e..2f24e8f 100644 --- a/game/slot/aristocrat/redroo/redroo_calc.go +++ b/game/slot/aristocrat/redroo/redroo_calc.go @@ -12,7 +12,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var reels, _ = slot.FindReels(ReelsMap, mrtp) var g = NewGame() var sln float64 = 40 - g.FS = 12 // set free spins mode + g.FSR = 12 // set free spins mode g.MW = [3]float64{2.5, 2.5, 2.5} var s slot.Stat diff --git a/game/slot/aristocrat/redroo/redroo_rule.go b/game/slot/aristocrat/redroo/redroo_rule.go index b7c4e3a..d4cf06c 100644 --- a/game/slot/aristocrat/redroo/redroo_rule.go +++ b/game/slot/aristocrat/redroo/redroo_rule.go @@ -36,8 +36,6 @@ var ScatFreespinBon = [5]int{0, 5, 8, 15, 20} // scatter type Game struct { slot.Slot5x4 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` // wild multipliers MW [3]float64 `json:"mw" yaml:"mw" xml:"mw"` } @@ -51,7 +49,6 @@ func NewGame() *Game { Sel: 40, Bet: 1, }, - FS: 0, MW: [3]float64{1, 1, 1}, } } @@ -140,7 +137,7 @@ func (g *Game) ScanScatters(screen *slot.Screen5x4, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var pay = ScatPay[count-1] var fs int - if g.FS > 0 { + if g.FSR > 0 { fs = ScatFreespinBon[count-1] } else { fs = ScatFreespinReg[count-1] @@ -164,7 +161,7 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } func (g *Game) Prepare() { - if g.FS > 0 { + if g.FSR > 0 { for x := range g.MW { if rand.Float64() < prob2x { g.MW[x] = 2 @@ -175,27 +172,6 @@ func (g *Game) Prepare() { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return slot.ErrNoFeature } diff --git a/game/slot/betsoft/2millionbc/2millionbc_calc.go b/game/slot/betsoft/2millionbc/2millionbc_calc.go index 117b5ae..9e527a5 100644 --- a/game/slot/betsoft/2millionbc/2millionbc_calc.go +++ b/game/slot/betsoft/2millionbc/2millionbc_calc.go @@ -37,7 +37,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 4 // set free spins mode + g.FSR = 4 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/betsoft/2millionbc/2millionbc_rule.go b/game/slot/betsoft/2millionbc/2millionbc_rule.go index 1e9a56d..f5dbf88 100644 --- a/game/slot/betsoft/2millionbc/2millionbc_rule.go +++ b/game/slot/betsoft/2millionbc/2millionbc_rule.go @@ -34,8 +34,6 @@ const ( type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` // acorns number AN int `json:"an" yaml:"an" xml:"an"` // acorns bet @@ -51,7 +49,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -126,7 +123,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -156,26 +153,24 @@ func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { } } - if g.FS != 0 { + if g.FSR != 0 { g.Gain += wins.Gain() + g.FSN++ } else { g.Gain = wins.Gain() + g.FSN = 0 } - if g.FS > 0 { - g.FS-- + if g.FSR > 0 { + g.FSR-- } for _, wi := range wins { if wi.Free > 0 { - g.FS += wi.Free + g.FSR += wi.Free } } } -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/betsoft/atthemovies/atthemovies_rule.go b/game/slot/betsoft/atthemovies/atthemovies_rule.go index 4a1d652..48a6832 100644 --- a/game/slot/betsoft/atthemovies/atthemovies_rule.go +++ b/game/slot/betsoft/atthemovies/atthemovies_rule.go @@ -47,8 +47,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:25] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -60,7 +58,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -92,7 +89,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { if pay := LinePay[syml-1][numl-1]; pay > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 2 } *wins = append(*wins, slot.WinItem{ @@ -111,7 +108,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 2 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -131,27 +128,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/megajack/champagne/champagne_calc.go b/game/slot/megajack/champagne/champagne_calc.go index 856adf1..b3d1873 100644 --- a/game/slot/megajack/champagne/champagne_calc.go +++ b/game/slot/megajack/champagne/champagne_calc.go @@ -41,7 +41,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, @@ -82,7 +82,7 @@ func CalcStatReg(ctx context.Context, mrtp float64) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 0 // no free spins + g.FSR = 0 // no free spins var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/megajack/champagne/champagne_rule.go b/game/slot/megajack/champagne/champagne_rule.go index ceb0806..22754d9 100644 --- a/game/slot/megajack/champagne/champagne_rule.go +++ b/game/slot/megajack/champagne/champagne_rule.go @@ -79,8 +79,6 @@ var BetLines = slot.BetLinesMgj type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -92,7 +90,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -122,7 +119,7 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { // Lined symbols calculation. func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 2 } @@ -205,7 +202,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 3 { var fs int - if g.FS > 0 { + if g.FSR > 0 { fs = ScatFreespinBon[count-1] } else { fs = ScatFreespinReg[count-1] @@ -236,27 +233,6 @@ func (g *Game) Spawn(screen slot.Screen, wins slot.Wins) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/arabiannights/arabiannights_calc.go b/game/slot/netent/arabiannights/arabiannights_calc.go index ff4d3ce..f5e65da 100644 --- a/game/slot/netent/arabiannights/arabiannights_calc.go +++ b/game/slot/netent/arabiannights/arabiannights_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/netent/arabiannights/arabiannights_rule.go b/game/slot/netent/arabiannights/arabiannights_rule.go index e8d7343..850fffa 100644 --- a/game/slot/netent/arabiannights/arabiannights_rule.go +++ b/game/slot/netent/arabiannights/arabiannights_rule.go @@ -51,8 +51,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:10] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -64,7 +62,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -108,7 +105,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -121,7 +118,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -141,7 +138,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -157,7 +154,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -165,27 +162,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/diamonddogs/diamonddogs_calc.go b/game/slot/netent/diamonddogs/diamonddogs_calc.go index 4323f7a..2e1aeab 100644 --- a/game/slot/netent/diamonddogs/diamonddogs_calc.go +++ b/game/slot/netent/diamonddogs/diamonddogs_calc.go @@ -15,7 +15,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 10 // set free spins mode + g.FSR = 10 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/netent/diamonddogs/diamonddogs_rule.go b/game/slot/netent/diamonddogs/diamonddogs_rule.go index 86dc409..d71ea8a 100644 --- a/game/slot/netent/diamonddogs/diamonddogs_rule.go +++ b/game/slot/netent/diamonddogs/diamonddogs_rule.go @@ -34,8 +34,6 @@ const ( type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -47,7 +45,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -92,7 +89,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -105,7 +102,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -133,7 +130,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -149,7 +146,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -166,27 +163,6 @@ func (g *Game) Spawn(screen slot.Screen, wins slot.Wins) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/fruitshop/fruitshop_calc.go b/game/slot/netent/fruitshop/fruitshop_calc.go index 626c53a..2cb4c84 100644 --- a/game/slot/netent/fruitshop/fruitshop_calc.go +++ b/game/slot/netent/fruitshop/fruitshop_calc.go @@ -12,7 +12,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var reels, _ = slot.FindReels(ReelsMap, mrtp) var g = NewGame() var sln = float64(g.Sel) - g.FS = 5 // set free spins mode + g.FSR = 5 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/netent/fruitshop/fruitshop_rule.go b/game/slot/netent/fruitshop/fruitshop_rule.go index 711fd25..619f157 100644 --- a/game/slot/netent/fruitshop/fruitshop_rule.go +++ b/game/slot/netent/fruitshop/fruitshop_rule.go @@ -56,8 +56,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:15] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -69,7 +67,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -101,7 +98,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { if pay := LinePay[syml-1][numl-1]; pay > 0 { var mm float64 = 1 // mult mode var fs int - if g.FS > 0 { + if g.FSR > 0 { mm = 2 fs = LineFreespinBon[syml-1][numl-1] } else { @@ -125,27 +122,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return slot.ErrNoFeature } diff --git a/game/slot/netent/groovysixties/groovysixties_rule.go b/game/slot/netent/groovysixties/groovysixties_rule.go index 24148fd..a466cbd 100644 --- a/game/slot/netent/groovysixties/groovysixties_rule.go +++ b/game/slot/netent/groovysixties/groovysixties_rule.go @@ -27,8 +27,6 @@ var BetLines = slot.BetLinesNetEnt5x4[:40] type Game struct { slot.Slot5x4 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -40,7 +38,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -83,7 +80,7 @@ func (g *Game) ScanLined(screen *slot.Screen5x4, wins *slot.Wins) { } if payl > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 2 } *wins = append(*wins, slot.WinItem{ @@ -96,7 +93,7 @@ func (g *Game) ScanLined(screen *slot.Screen5x4, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 2 } *wins = append(*wins, slot.WinItem{ @@ -115,7 +112,7 @@ func (g *Game) ScanLined(screen *slot.Screen5x4, wins *slot.Wins) { func (g *Game) ScanScatters(screen *slot.Screen5x4, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 3 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 2 } var pay float64 = 2 @@ -135,27 +132,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/piggyriches/piggyriches_calc.go b/game/slot/netent/piggyriches/piggyriches_calc.go index d670351..32647d2 100644 --- a/game/slot/netent/piggyriches/piggyriches_calc.go +++ b/game/slot/netent/piggyriches/piggyriches_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode g.M = 3 var s slot.Stat diff --git a/game/slot/netent/piggyriches/piggyriches_rule.go b/game/slot/netent/piggyriches/piggyriches_rule.go index e6f4c48..190fcee 100644 --- a/game/slot/netent/piggyriches/piggyriches_rule.go +++ b/game/slot/netent/piggyriches/piggyriches_rule.go @@ -28,8 +28,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:15] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` // multiplier on freespins M float64 `json:"m,omitempty" yaml:"m,omitempty" xml:"m,omitempty"` } @@ -43,8 +41,7 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, - M: 0, + M: 0, } } @@ -79,7 +76,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { if numl >= 2 && syml > 0 { if pay := LinePay[syml-1][numl-1]; pay > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = g.M } *wins = append(*wins, slot.WinItem{ @@ -98,7 +95,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { // Scatters calculation. func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { var count = screen.ScatNum(scat) - if g.FS > 0 { + if g.FSR > 0 { *wins = append(*wins, slot.WinItem{ Pay: 0, Mult: 1, @@ -129,32 +126,30 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { + if g.FSR != 0 { g.Gain += wins.Gain() + g.FSN++ } else { g.Gain = wins.Gain() + g.FSN = 0 } - if g.FS > 0 { - g.FS-- + if g.FSR > 0 { + g.FSR-- } for _, wi := range wins { if wi.Free > 0 { - g.FS += wi.Free + g.FSR += wi.Free if g.M == 0 { g.M = 3 } } } - if g.FS == 0 { + if g.FSR == 0 { g.M = 0 } } -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } @@ -164,14 +159,14 @@ func (g *Game) SetSel(sel int) error { // * 3 with 15 free spins // * 5 with 9 free spins func (g *Game) SetMode(n int) error { - var fs = g.FS * int(g.M) + var fs = g.FSR * int(g.M) switch n { case 2: - g.FS = fs / 2 + g.FSR = fs / 2 case 3: - g.FS = fs / 3 + g.FSR = fs / 3 case 5: - g.FS = fs / 5 + g.FSR = fs / 5 default: return slot.ErrDisabled } diff --git a/game/slot/netent/reelsteal/reelsteal_calc.go b/game/slot/netent/reelsteal/reelsteal_calc.go index 4b07f9c..d435d23 100644 --- a/game/slot/netent/reelsteal/reelsteal_calc.go +++ b/game/slot/netent/reelsteal/reelsteal_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/netent/reelsteal/reelsteal_rule.go b/game/slot/netent/reelsteal/reelsteal_rule.go index fca1399..9953b44 100644 --- a/game/slot/netent/reelsteal/reelsteal_rule.go +++ b/game/slot/netent/reelsteal/reelsteal_rule.go @@ -33,8 +33,6 @@ var BetLines = slot.BetLinesNvm9 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -46,7 +44,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -80,7 +77,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { if numl >= 3 && syml > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 5 } var pay = LinePay[syml-1][numl-1] @@ -99,7 +96,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { // Scatters calculation. func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { var count = screen.ScatNum(scat) - if g.FS > 0 { + if g.FSR > 0 { *wins = append(*wins, slot.WinItem{ Pay: 0, Mult: 1, @@ -126,27 +123,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/simsalabim/simsalabim_calc.go b/game/slot/netent/simsalabim/simsalabim_calc.go index a3defc1..199cdd9 100644 --- a/game/slot/netent/simsalabim/simsalabim_calc.go +++ b/game/slot/netent/simsalabim/simsalabim_calc.go @@ -15,7 +15,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 10 // set free spins mode + g.FSR = 10 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/netent/simsalabim/simsalabim_rule.go b/game/slot/netent/simsalabim/simsalabim_rule.go index 353b2cb..d546f69 100644 --- a/game/slot/netent/simsalabim/simsalabim_rule.go +++ b/game/slot/netent/simsalabim/simsalabim_rule.go @@ -35,8 +35,6 @@ const ( type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -48,7 +46,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -93,7 +90,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -106,7 +103,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -134,7 +131,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -150,7 +147,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -167,27 +164,6 @@ func (g *Game) Spawn(screen slot.Screen, wins slot.Wins) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/spellcast/spellcast_rule.go b/game/slot/netent/spellcast/spellcast_rule.go index 90b5d9a..c05367e 100644 --- a/game/slot/netent/spellcast/spellcast_rule.go +++ b/game/slot/netent/spellcast/spellcast_rule.go @@ -34,8 +34,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:20] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -47,7 +45,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -91,7 +88,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -104,7 +101,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -123,7 +120,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -143,27 +140,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/thrillspin/thrillspin_rule.go b/game/slot/netent/thrillspin/thrillspin_rule.go index 0264397..365b0e2 100644 --- a/game/slot/netent/thrillspin/thrillspin_rule.go +++ b/game/slot/netent/thrillspin/thrillspin_rule.go @@ -34,8 +34,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:15] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -47,7 +45,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -91,7 +88,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -104,7 +101,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -123,7 +120,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -143,27 +140,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/tikiwonders/tikiwonders_rule.go b/game/slot/netent/tikiwonders/tikiwonders_rule.go index a14bfaf..ef40349 100644 --- a/game/slot/netent/tikiwonders/tikiwonders_rule.go +++ b/game/slot/netent/tikiwonders/tikiwonders_rule.go @@ -32,8 +32,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:30] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -45,7 +43,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -87,7 +84,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -100,7 +97,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -119,7 +116,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -139,27 +136,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/netent/trolls/trolls_rule.go b/game/slot/netent/trolls/trolls_rule.go index 2531717..6a495dc 100644 --- a/game/slot/netent/trolls/trolls_rule.go +++ b/game/slot/netent/trolls/trolls_rule.go @@ -55,8 +55,6 @@ var BetLines = slot.BetLinesNetEnt5x3[:20] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } func NewGame() *Game { @@ -65,7 +63,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -116,7 +113,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -129,7 +126,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -149,7 +146,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -169,27 +166,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/novomatic/bananasgobahamas/bananasgobahamas_calc.go b/game/slot/novomatic/bananasgobahamas/bananasgobahamas_calc.go index 93c9c86..255168c 100644 --- a/game/slot/novomatic/bananasgobahamas/bananasgobahamas_calc.go +++ b/game/slot/novomatic/bananasgobahamas/bananasgobahamas_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 45 // set free spins mode + g.FSR = 45 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/novomatic/bananasgobahamas/bananasgobahamas_rule.go b/game/slot/novomatic/bananasgobahamas/bananasgobahamas_rule.go index 850e8ac..5c083bd 100644 --- a/game/slot/novomatic/bananasgobahamas/bananasgobahamas_rule.go +++ b/game/slot/novomatic/bananasgobahamas/bananasgobahamas_rule.go @@ -53,8 +53,6 @@ var BetLines = slot.BetLinesNvm10 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -66,7 +64,6 @@ func NewGame() *Game { Sel: 5, Bet: 1, }, - FS: 0, } } @@ -147,7 +144,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -155,27 +152,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/novomatic/beetlemania/beetlemania_calc.go b/game/slot/novomatic/beetlemania/beetlemania_calc.go index 34249bc..04692b5 100644 --- a/game/slot/novomatic/beetlemania/beetlemania_calc.go +++ b/game/slot/novomatic/beetlemania/beetlemania_calc.go @@ -16,7 +16,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 10 // set free spins mode + g.FSR = 10 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/novomatic/beetlemania/beetlemania_rule.go b/game/slot/novomatic/beetlemania/beetlemania_rule.go index c562ae1..9907acb 100644 --- a/game/slot/novomatic/beetlemania/beetlemania_rule.go +++ b/game/slot/novomatic/beetlemania/beetlemania_rule.go @@ -31,8 +31,6 @@ var BetLines = slot.BetLinesNvm10 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -44,7 +42,6 @@ func NewGame() *Game { Sel: 5, Bet: 1, }, - FS: 0, } } @@ -132,7 +129,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { // Scatters calculation. func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { - if g.FS > 0 { + if g.FSR > 0 { var y slot.Pos if screen.At(3, 1) == jazz { y = 1 @@ -169,7 +166,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -186,27 +183,6 @@ func (g *Game) Spawn(screen slot.Screen, wins slot.Wins) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/novomatic/chicago/chicago_rule.go b/game/slot/novomatic/chicago/chicago_rule.go index 657aa8b..d9eb7bf 100644 --- a/game/slot/novomatic/chicago/chicago_rule.go +++ b/game/slot/novomatic/chicago/chicago_rule.go @@ -55,8 +55,6 @@ var BetLines = slot.BetLinesNvm20 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` // multiplier on freespins M float64 `json:"m,omitempty" yaml:"m,omitempty" xml:"m,omitempty"` } @@ -70,8 +68,7 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, - M: 0, + M: 0, } } @@ -85,7 +82,7 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { // Lined symbols calculation. func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = g.M *wins = append(*wins, slot.WinItem{ Mult: mm, @@ -146,7 +143,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = g.M } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -170,34 +167,13 @@ var MultChoose = []float64{1, 2, 3, 5, 10} // E = 4.2 const Emc = 4.2 func (g *Game) Prepare() { - if g.FS > 0 { + if g.FSR > 0 { g.M = MultChoose[rand.N(len(MultChoose))] } else { g.M = 0 } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/novomatic/columbus/columbus_calc.go b/game/slot/novomatic/columbus/columbus_calc.go index a2879dd..64fc9b5 100644 --- a/game/slot/novomatic/columbus/columbus_calc.go +++ b/game/slot/novomatic/columbus/columbus_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 10 // set free spins mode + g.FSR = 10 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/novomatic/columbus/columbus_rule.go b/game/slot/novomatic/columbus/columbus_rule.go index ac1b1eb..89073c1 100644 --- a/game/slot/novomatic/columbus/columbus_rule.go +++ b/game/slot/novomatic/columbus/columbus_rule.go @@ -41,8 +41,6 @@ var BetLines = slot.BetLinesNvm10 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -54,7 +52,6 @@ func NewGame() *Game { Sel: 5, Bet: 1, }, - FS: 0, } } @@ -68,7 +65,7 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { // Lined symbols calculation. func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { var wbon slot.Sym - if g.FS > 0 { + if g.FSR > 0 { wbon = scat } @@ -136,7 +133,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -144,27 +141,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/novomatic/dolphinspearl/dolphinspearl_calc.go b/game/slot/novomatic/dolphinspearl/dolphinspearl_calc.go index 1563aea..a6a2f45 100644 --- a/game/slot/novomatic/dolphinspearl/dolphinspearl_calc.go +++ b/game/slot/novomatic/dolphinspearl/dolphinspearl_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/novomatic/dolphinspearl/dolphinspearl_rule.go b/game/slot/novomatic/dolphinspearl/dolphinspearl_rule.go index d2b3845..51ddc80 100644 --- a/game/slot/novomatic/dolphinspearl/dolphinspearl_rule.go +++ b/game/slot/novomatic/dolphinspearl/dolphinspearl_rule.go @@ -53,8 +53,6 @@ var BetLines = slot.BetLinesNvm10 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -66,7 +64,6 @@ func NewGame() *Game { Sel: 5, Bet: 1, }, - FS: 0, } } @@ -110,7 +107,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -123,7 +120,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -143,7 +140,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -159,7 +156,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -167,27 +164,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/novomatic/katana/katana_calc.go b/game/slot/novomatic/katana/katana_calc.go index 9cf982e..9d1151f 100644 --- a/game/slot/novomatic/katana/katana_calc.go +++ b/game/slot/novomatic/katana/katana_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 10 // set free spins mode + g.FSR = 10 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/novomatic/katana/katana_rule.go b/game/slot/novomatic/katana/katana_rule.go index 8318cfd..9d4ac88 100644 --- a/game/slot/novomatic/katana/katana_rule.go +++ b/game/slot/novomatic/katana/katana_rule.go @@ -51,8 +51,6 @@ var BetLines = slot.BetLinesNvm20 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -64,7 +62,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -78,7 +75,7 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { // Lined symbols calculation. func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { var reelwild [5]bool - if g.FS > 0 { + if g.FSR > 0 { var x, y slot.Pos for x = 1; x <= 5; x++ { for y = 1; y <= 3; y++ { @@ -156,7 +153,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -164,27 +161,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/novomatic/powerstars/powerstars_rule.go b/game/slot/novomatic/powerstars/powerstars_rule.go index 85635a3..e6e8972 100644 --- a/game/slot/novomatic/powerstars/powerstars_rule.go +++ b/game/slot/novomatic/powerstars/powerstars_rule.go @@ -156,8 +156,10 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { if g.FreeSpins() != 0 { g.Gain += wins.Gain() + g.FSN++ } else { g.Gain = wins.Gain() + g.FSN = 0 } var x, y slot.Pos diff --git a/game/slot/playngo/copsnrobbers/copsnrobbers_calc.go b/game/slot/playngo/copsnrobbers/copsnrobbers_calc.go index 1ec0e02..d7ea322 100644 --- a/game/slot/playngo/copsnrobbers/copsnrobbers_calc.go +++ b/game/slot/playngo/copsnrobbers/copsnrobbers_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = Efs // set free spins mode + g.FSR = Efs // set free spins mode g.M = 1 var s slot.Stat diff --git a/game/slot/playngo/copsnrobbers/copsnrobbers_rule.go b/game/slot/playngo/copsnrobbers/copsnrobbers_rule.go index e80b38f..495d84c 100644 --- a/game/slot/playngo/copsnrobbers/copsnrobbers_rule.go +++ b/game/slot/playngo/copsnrobbers/copsnrobbers_rule.go @@ -48,8 +48,6 @@ const ( type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` // multiplier for free spins, if them ended by "got away" M float64 `json:"m,omitempty" yaml:"m,omitempty" xml:"m,omitempty"` } @@ -63,8 +61,7 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, - M: 0, + M: 0, } } @@ -72,7 +69,7 @@ const wild, scat = 1, 2 func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { g.ScanLined(screen, wins) - if g.FS == 0 { + if g.FSR == 0 { g.ScanScatters(screen, wins) } } @@ -110,7 +107,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = g.M } *wins = append(*wins, slot.WinItem{ @@ -123,7 +120,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = g.M } *wins = append(*wins, slot.WinItem{ @@ -157,7 +154,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -166,21 +163,23 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { + if g.FSR != 0 { g.Gain += wins.Gain() + g.FSN++ } else { g.Gain = wins.Gain() + g.FSN = 0 } - if g.FS > 0 { - g.FS-- - if g.FS == 0 { + if g.FSR > 0 { + g.FSR-- + if g.FSR == 0 { g.M = 0 // no multiplier on regular games } } else { // free spins can not be nested for _, wi := range wins { if wi.Free > 0 { - g.FS = wi.Free + g.FSR = wi.Free if rand.Float64() <= Pfs { g.M = 2 } else { @@ -191,10 +190,6 @@ func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { } } -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/playngo/firejoker/firejoker_rule.go b/game/slot/playngo/firejoker/firejoker_rule.go index 582d8b4..b024f1a 100644 --- a/game/slot/playngo/firejoker/firejoker_rule.go +++ b/game/slot/playngo/firejoker/firejoker_rule.go @@ -32,8 +32,6 @@ var BetLines = slot.BetLinesHot5 type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -45,7 +43,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -111,7 +108,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { func (g *Game) Spin(screen slot.Screen, mrtp float64) { var reels, _ = slot.FindReels(ReelsMap, mrtp) - if g.FS == 0 { + if g.FSR == 0 { screen.Spin(reels) } else { var reel []slot.Sym @@ -135,27 +132,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return slot.ErrNoFeature } diff --git a/game/slot/playngo/fortuneteller/fortuneteller_calc.go b/game/slot/playngo/fortuneteller/fortuneteller_calc.go index fe01e82..733cb52 100644 --- a/game/slot/playngo/fortuneteller/fortuneteller_calc.go +++ b/game/slot/playngo/fortuneteller/fortuneteller_calc.go @@ -29,7 +29,7 @@ func CalcStatBon(ctx context.Context, mrtp float64) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/playngo/fortuneteller/fortuneteller_rule.go b/game/slot/playngo/fortuneteller/fortuneteller_rule.go index 6b80c32..7d83865 100644 --- a/game/slot/playngo/fortuneteller/fortuneteller_rule.go +++ b/game/slot/playngo/fortuneteller/fortuneteller_rule.go @@ -59,8 +59,6 @@ const ( type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -72,14 +70,13 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } const wild, scat, bon = 1, 2, 3 func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { - if g.FS == 0 { + if g.FSR == 0 { g.ScanLinedReg(screen, wins) g.ScanScattersReg(screen, wins) } else { @@ -235,27 +232,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { screen.Spin(reels) } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/playtech/deserttreasure/deserttreasure_calc.go b/game/slot/playtech/deserttreasure/deserttreasure_calc.go index 3b7fb8a..8c9456c 100644 --- a/game/slot/playtech/deserttreasure/deserttreasure_calc.go +++ b/game/slot/playtech/deserttreasure/deserttreasure_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 10 // set free spins mode + g.FSR = 10 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/playtech/deserttreasure/deserttreasure_rule.go b/game/slot/playtech/deserttreasure/deserttreasure_rule.go index 1508fe8..01f051d 100644 --- a/game/slot/playtech/deserttreasure/deserttreasure_rule.go +++ b/game/slot/playtech/deserttreasure/deserttreasure_rule.go @@ -39,8 +39,6 @@ var BetLines = []slot.Linex{ type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -52,7 +50,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -94,7 +91,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -107,7 +104,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -126,7 +123,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -142,7 +139,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -150,27 +147,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/playtech/greatblue/greatblue_rule.go b/game/slot/playtech/greatblue/greatblue_rule.go index 322386b..297c017 100644 --- a/game/slot/playtech/greatblue/greatblue_rule.go +++ b/game/slot/playtech/greatblue/greatblue_rule.go @@ -63,8 +63,6 @@ func (s *Seashells) SetupShell(shell int) { type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` // multiplier on freespins M float64 `json:"m,omitempty" yaml:"m,omitempty" xml:"m,omitempty"` } @@ -78,8 +76,7 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, - M: 0, + M: 0, } } @@ -123,7 +120,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = g.M } *wins = append(*wins, slot.WinItem{ @@ -136,7 +133,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = g.M } *wins = append(*wins, slot.WinItem{ @@ -156,7 +153,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var pay, fs = ScatPay[count-1], 0 var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm, fs = g.M, 15 } else if count >= 3 { fs = 8 @@ -178,7 +175,7 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } func (g *Game) Spawn(screen slot.Screen, wins slot.Wins) { - if g.FS > 0 { + if g.FSR > 0 { return } for i := range wins { @@ -203,35 +200,33 @@ func (g *Game) Spawn(screen slot.Screen, wins slot.Wins) { } func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { + if g.FSR != 0 { g.Gain += wins.Gain() + g.FSN++ } else { g.Gain = wins.Gain() + g.FSN = 0 } - if g.FS > 0 { - g.FS-- + if g.FSR > 0 { + g.FSR-- } for _, wi := range wins { if wi.Sym == scat { if g.M > 0 { - g.FS += wi.Free + g.FSR += wi.Free } else { var bon = wi.Bon.(Seashells) - g.FS = bon.Free + g.FSR = bon.Free g.M = bon.Mult } } } - if g.FS == 0 { + if g.FSR == 0 { g.M = 0 } } -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/playtech/panthermoon/panthermoon_calc.go b/game/slot/playtech/panthermoon/panthermoon_calc.go index 28a70d1..db6fe5b 100644 --- a/game/slot/playtech/panthermoon/panthermoon_calc.go +++ b/game/slot/playtech/panthermoon/panthermoon_calc.go @@ -13,7 +13,7 @@ func CalcStatBon(ctx context.Context) float64 { var g = NewGame() var sln float64 = 1 g.Sel = int(sln) - g.FS = 15 // set free spins mode + g.FSR = 15 // set free spins mode var s slot.Stat var dur = slot.ScanReels5x(ctx, &s, g, reels, diff --git a/game/slot/playtech/panthermoon/panthermoon_rule.go b/game/slot/playtech/panthermoon/panthermoon_rule.go index 4280b0c..10127fb 100644 --- a/game/slot/playtech/panthermoon/panthermoon_rule.go +++ b/game/slot/playtech/panthermoon/panthermoon_rule.go @@ -55,8 +55,6 @@ var BetLines = slot.BetLinesPlt5x3[:15] type Game struct { slot.Slot5x3 `yaml:",inline"` - // free spin number - FS int `json:"fs,omitempty" yaml:"fs,omitempty" xml:"fs,omitempty"` } // Declare conformity with SlotGame interface. @@ -68,7 +66,6 @@ func NewGame() *Game { Sel: len(BetLines), Bet: 1, }, - FS: 0, } } @@ -112,7 +109,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { } if payl*mw > payw { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -125,7 +122,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { }) } else if payw > 0 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } *wins = append(*wins, slot.WinItem{ @@ -145,7 +142,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) { func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { if count := screen.ScatNum(scat); count >= 2 { var mm float64 = 1 // mult mode - if g.FS > 0 { + if g.FSR > 0 { mm = 3 } var pay, fs = ScatPay[count-1], ScatFreespin[count-1] @@ -161,7 +158,7 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) { } func (g *Game) Spin(screen slot.Screen, mrtp float64) { - if g.FS == 0 { + if g.FSR == 0 { var reels, _ = slot.FindReels(ReelsMap, mrtp) screen.Spin(reels) } else { @@ -169,27 +166,6 @@ func (g *Game) Spin(screen slot.Screen, mrtp float64) { } } -func (g *Game) Apply(screen slot.Screen, wins slot.Wins) { - if g.FS != 0 { - g.Gain += wins.Gain() - } else { - g.Gain = wins.Gain() - } - - if g.FS > 0 { - g.FS-- - } - for _, wi := range wins { - if wi.Free > 0 { - g.FS += wi.Free - } - } -} - -func (g *Game) FreeSpins() int { - return g.FS -} - func (g *Game) SetSel(sel int) error { return g.SetSelNum(sel, len(BetLines)) } diff --git a/game/slot/slot.go b/game/slot/slot.go index 79cb6da..6386291 100644 --- a/game/slot/slot.go +++ b/game/slot/slot.go @@ -118,7 +118,12 @@ type Slot3x3 struct { Sel int `json:"sel" yaml:"sel" xml:"sel"` // selected bet lines Bet float64 `json:"bet" yaml:"bet" xml:"bet"` // bet value - Gain float64 `json:"gain,omitempty" yaml:"gain,omitempty" xml:"gain,omitempty"` // gain for double up games + // gain for double up games + Gain float64 `json:"gain,omitempty" yaml:"gain,omitempty" xml:"gain,omitempty"` + // free spin number + FSN int `json:"fsn,omitempty" yaml:"fsn,omitempty" xml:"fsn,omitempty"` + // free spin remains + FSR int `json:"fsr,omitempty" yaml:"fsr,omitempty" xml:"fsr,omitempty"` } func (g *Slot3x3) NewScreen() Screen { @@ -132,11 +137,26 @@ func (g *Slot3x3) Prepare() { } func (g *Slot3x3) Apply(screen Screen, wins Wins) { - g.Gain = wins.Gain() + if g.FSR != 0 { + g.Gain += wins.Gain() + g.FSN++ + } else { + g.Gain = wins.Gain() + g.FSN = 0 + } + + if g.FSR > 0 { + g.FSR-- + } + for _, wi := range wins { + if wi.Free > 0 { + g.FSR += wi.Free + } + } } func (g *Slot3x3) FreeSpins() int { - return 0 + return g.FSR } func (g *Slot3x3) GetGain() float64 { @@ -190,7 +210,12 @@ type Slot5x3 struct { Sel int `json:"sel" yaml:"sel" xml:"sel"` // selected bet lines Bet float64 `json:"bet" yaml:"bet" xml:"bet"` // bet value - Gain float64 `json:"gain,omitempty" yaml:"gain,omitempty" xml:"gain,omitempty"` // gain for double up games + // gain for double up games + Gain float64 `json:"gain,omitempty" yaml:"gain,omitempty" xml:"gain,omitempty"` + // free spin number + FSN int `json:"fsn,omitempty" yaml:"fsn,omitempty" xml:"fsn,omitempty"` + // free spin remains + FSR int `json:"fsr,omitempty" yaml:"fsr,omitempty" xml:"fsr,omitempty"` } func (g *Slot5x3) NewScreen() Screen { @@ -204,11 +229,26 @@ func (g *Slot5x3) Prepare() { } func (g *Slot5x3) Apply(screen Screen, wins Wins) { - g.Gain = wins.Gain() + if g.FSR != 0 { + g.Gain += wins.Gain() + g.FSN++ + } else { + g.Gain = wins.Gain() + g.FSN = 0 + } + + if g.FSR > 0 { + g.FSR-- + } + for _, wi := range wins { + if wi.Free > 0 { + g.FSR += wi.Free + } + } } func (g *Slot5x3) FreeSpins() int { - return 0 + return g.FSR } func (g *Slot5x3) GetGain() float64 { @@ -262,7 +302,12 @@ type Slot5x4 struct { Sel int `json:"sel" yaml:"sel" xml:"sel"` // selected bet lines Bet float64 `json:"bet" yaml:"bet" xml:"bet"` // bet value - Gain float64 `json:"gain,omitempty" yaml:"gain,omitempty" xml:"gain,omitempty"` // gain for double up games + // gain for double up games + Gain float64 `json:"gain,omitempty" yaml:"gain,omitempty" xml:"gain,omitempty"` + // free spin number + FSN int `json:"fsn,omitempty" yaml:"fsn,omitempty" xml:"fsn,omitempty"` + // free spin remains + FSR int `json:"fsr,omitempty" yaml:"fsr,omitempty" xml:"fsr,omitempty"` } func (g *Slot5x4) NewScreen() Screen { @@ -276,11 +321,26 @@ func (g *Slot5x4) Prepare() { } func (g *Slot5x4) Apply(screen Screen, wins Wins) { - g.Gain = wins.Gain() + if g.FSR != 0 { + g.Gain += wins.Gain() + g.FSN++ + } else { + g.Gain = wins.Gain() + g.FSN = 0 + } + + if g.FSR > 0 { + g.FSR-- + } + for _, wi := range wins { + if wi.Free > 0 { + g.FSR += wi.Free + } + } } func (g *Slot5x4) FreeSpins() int { - return 0 + return g.FSR } func (g *Slot5x4) GetGain() float64 {