Skip to content

Commit

Permalink
agt/extraspiniii game added.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarzlichtbezirk committed Dec 15, 2024
1 parent b8666f3 commit 840facd
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 12 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Slots games server. Releases functionality for Megajack, Novomatic, NetEnt, BetS
Server provides HTTP-based API for popular slots and have well-optimized performance for thousands requests per second. Can be deployed on dedicated server or as portable application for Linux or Windows.

```text
total: 130 games, 67 algorithms, 9 providers
AGT: 48 games
total: 131 games, 68 algorithms, 9 providers
AGT: 49 games
Aristocrat: 4 games
BetSoft: 3 games
Megajack: 3 games
Expand All @@ -30,6 +30,7 @@ Slotopol: 4 games

*Last added games*:

* '[Extra Spin III](https://demo.agtsoftware.com/games/agt/extraspin3)' AGT 5x3 videoslot
* '[Santa](https://demo.agtsoftware.com/games/agt/santa)' AGT 4x4 videoslot
* '[Panda](https://demo.agtsoftware.com/games/agt/panda)' AGT 3x3 videoslot
* '[Extra Spin](https://demo.agtsoftware.com/games/agt/extraspin)' AGT 5x3 videoslot
Expand Down
1 change: 1 addition & 0 deletions cmd/links.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import (
_ "github.com/slotopol/server/game/slot/agt/doubleice"
_ "github.com/slotopol/server/game/slot/agt/egypt"
_ "github.com/slotopol/server/game/slot/agt/extraspin"
_ "github.com/slotopol/server/game/slot/agt/extraspin3"
_ "github.com/slotopol/server/game/slot/agt/happysanta"
_ "github.com/slotopol/server/game/slot/agt/happysanta50"
_ "github.com/slotopol/server/game/slot/agt/hotclover"
Expand Down
5 changes: 3 additions & 2 deletions docs/list-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
'Dynasty Of Ming' Novomatic 5x3 videoslot
'Egypt' AGT 5x3 videoslot
'Excalibur' NetEnt 5x3 videoslot
'Extra Spin III' AGT 5x3 videoslot
'Extra Spin' AGT 5x3 videoslot
'Fire Joker' Play'n GO 5x3 videoslot
'Fire Keno' Slotopol 80 spots lottery
Expand Down Expand Up @@ -133,8 +134,8 @@
'Wild Witches' NetEnt 5x3 videoslot
'Wizard' AGT 5x4 videoslot
total: 130 games, 67 algorithms, 9 providers
AGT: 48 games
total: 131 games, 68 algorithms, 9 providers
AGT: 49 games
Aristocrat: 4 games
BetSoft: 3 games
Megajack: 3 games
Expand Down
27 changes: 27 additions & 0 deletions game/slot/agt/extraspin3/extraspin3_link.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//go:build !prod || full || agt

package extraspin3

import (
"github.com/slotopol/server/game"
)

var Info = game.GameInfo{
Aliases: []game.GameAlias{
{Prov: "AGT", Name: "Extra Spin III"},
},
GP: game.GPsel |
game.GPretrig |
game.GPscat |
game.GPwild,
SX: 5,
SY: 3,
SN: len(LinePay),
LN: len(BetLines),
BN: 0,
RTP: game.MakeRtpList(ReelsMap),
}

func init() {
Info.SetupFactory(func() any { return NewGame() }, CalcStat)
}
115 changes: 115 additions & 0 deletions game/slot/agt/extraspin3/extraspin3_rule.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
package extraspin3

// See: https://demo.agtsoftware.com/games/agt/extraspin3

import (
"github.com/slotopol/server/game/slot"
"github.com/slotopol/server/game/slot/agt/extraspin"
)

// Copy data from extraspin.
var (
LinePay = extraspin.LinePay

ReelsMap = extraspin.ReelsMap

CalcStat = extraspin.CalcStat
)

// Bet lines
var BetLines = slot.BetLinesAgt5x3[:10]

type Game struct {
slot.Slot5x3 `yaml:",inline"`
}

// Declare conformity with SlotGame interface.
var _ slot.SlotGame = (*Game)(nil)

func NewGame() *Game {
return &Game{
Slot5x3: slot.Slot5x3{
Sel: len(BetLines),
Bet: 1,
},
}
}

const wild, scat = 1, 2

func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) {
g.ScanLined(screen, wins)
g.ScanScatters(screen, wins)
}

// Lined symbols calculation.
func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) {
for li := 1; li <= g.Sel; li++ {
var line = BetLines[li-1]

var numw, numl slot.Pos = 0, 5
var syml slot.Sym
var x slot.Pos
for x = 1; x <= 5; x++ {
var sx = screen.Pos(x, line)
if sx == wild {
if syml == 0 {
numw = x
}
} else if syml == 0 && sx != scat {
syml = sx
} else if sx != syml {
numl = x - 1
break
}
}

var payw, payl float64
if numw > 0 {
payw = LinePay[wild-1][numw-1]
}
if numl > 0 && syml > 0 {
payl = LinePay[syml-1][numl-1]
}
if payl > payw {
*wins = append(*wins, slot.WinItem{
Pay: g.Bet * payl,
Mult: 1,
Sym: syml,
Num: numl,
Line: li,
XY: line.CopyL(numl),
})
} else if payw > 0 {
*wins = append(*wins, slot.WinItem{
Pay: g.Bet * payw,
Mult: 1,
Sym: wild,
Num: numw,
Line: li,
XY: line.CopyL(numw),
})
}
}
}

// Scatters calculation.
func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) {
if count := screen.ScatNum(scat); count >= 1 {
*wins = append(*wins, slot.WinItem{
Sym: scat,
Num: count,
XY: screen.ScatPos(scat),
Free: int(count) * 3,
})
}
}

func (g *Game) Spin(screen slot.Screen, mrtp float64) {
var reels, _ = slot.FindReels(ReelsMap, mrtp)
screen.Spin(reels)
}

func (g *Game) SetSel(sel int) error {
return g.SetSelNum(sel, len(BetLines))
}
11 changes: 3 additions & 8 deletions game/slot/agt/icequeen/icequeen_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ import (

// Copy data from dolphinspearl.
var (
// Lined payment.
LinePay = dolphinspearl.LinePay

// Scatters payment.
ScatPay = dolphinspearl.ScatPay

// Scatter freespins table
LinePay = dolphinspearl.LinePay
ScatPay = dolphinspearl.ScatPay
ScatFreespin = dolphinspearl.ScatFreespin

ReelsBon = dolphinspearl.ReelsBon
Expand All @@ -36,7 +31,7 @@ var _ slot.SlotGame = (*Game)(nil)
func NewGame() *Game {
return &Game{
Slot5x3: slot.Slot5x3{
Sel: 5,
Sel: 10,
Bet: 1,
},
}
Expand Down

0 comments on commit 840facd

Please sign in to comment.