From f014f9ec8c76f1cd23b9de938c3eb38c3220d2cb Mon Sep 17 00:00:00 2001 From: schwarzlichtbezirk Date: Mon, 23 Dec 2024 02:56:08 +0300 Subject: [PATCH] agt/halloween game added. --- README.md | 5 +- cmd/links.go | 1 + game/slot/agt/halloween/halloween_calc.go | 28 +++ game/slot/agt/halloween/halloween_link.go | 24 +++ game/slot/agt/halloween/halloween_reel.yaml | 196 ++++++++++++++++++++ game/slot/agt/halloween/halloween_rule.go | 82 ++++++++ go.mod | 2 +- go.sum | 4 +- helper/halloween.lua | 28 +++ 9 files changed, 365 insertions(+), 5 deletions(-) create mode 100644 game/slot/agt/halloween/halloween_calc.go create mode 100644 game/slot/agt/halloween/halloween_link.go create mode 100644 game/slot/agt/halloween/halloween_reel.yaml create mode 100644 game/slot/agt/halloween/halloween_rule.go create mode 100644 helper/halloween.lua diff --git a/README.md b/README.md index 213dbc60..c9ba90aa 100644 --- a/README.md +++ b/README.md @@ -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: 135 games, 70 algorithms, 9 providers -AGT: 53 games +total: 136 games, 71 algorithms, 9 providers +AGT: 54 games Aristocrat: 4 games BetSoft: 3 games Megajack: 3 games @@ -30,6 +30,7 @@ Slotopol: 4 games *Last added games*: +* '[Halloween](https://demo.agtsoftware.com/games/agt/halloween)' AGT 3x3 videoslot * '[Merry Christmas](https://demo.agtsoftware.com/games/agt/christmas)' AGT 3x3 videoslot * '[Ice Fruits](https://demo.agtsoftware.com/games/agt/megaice)' AGT 5x3 videoslot * '[100 Jokers](https://demo.agtsoftware.com/games/agt/jokers100)' AGT 5x4 videoslot diff --git a/cmd/links.go b/cmd/links.go index 37a79224..5343b8fe 100644 --- a/cmd/links.go +++ b/cmd/links.go @@ -71,6 +71,7 @@ import ( _ "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/halloween" _ "github.com/slotopol/server/game/slot/agt/hotclover" _ "github.com/slotopol/server/game/slot/agt/icefruits" _ "github.com/slotopol/server/game/slot/agt/iceiceice" diff --git a/game/slot/agt/halloween/halloween_calc.go b/game/slot/agt/halloween/halloween_calc.go new file mode 100644 index 00000000..34b225f5 --- /dev/null +++ b/game/slot/agt/halloween/halloween_calc.go @@ -0,0 +1,28 @@ +package halloween + +import ( + "context" + "fmt" + "time" + + "github.com/slotopol/server/game/slot" +) + +func CalcStat(ctx context.Context, mrtp float64) float64 { + var reels, _ = slot.FindReels(ReelsMap, mrtp) + var g = NewGame() + var sln float64 = 1 + g.Sel = int(sln) + var s slot.Stat + + var dur = slot.ScanReels3x(ctx, &s, g, reels, + time.Tick(2*time.Second), time.Tick(2*time.Second)) + + var reshuf = float64(s.Reshuffles) + var lrtp = s.LinePay / reshuf / sln * 100 + fmt.Printf("completed %.5g%%, selected %d lines, time spent %v\n", reshuf/float64(s.Planned())*100, g.Sel, dur) + fmt.Printf("reels lengths [%d, %d, %d], total reshuffles %d\n", + len(reels.Reel(1)), len(reels.Reel(2)), len(reels.Reel(3)), reels.Reshuffles()) + fmt.Printf("RTP = %.6f%%\n", lrtp) + return lrtp +} diff --git a/game/slot/agt/halloween/halloween_link.go b/game/slot/agt/halloween/halloween_link.go new file mode 100644 index 00000000..5ad67f72 --- /dev/null +++ b/game/slot/agt/halloween/halloween_link.go @@ -0,0 +1,24 @@ +//go:build !prod || full || agt + +package halloween + +import ( + "github.com/slotopol/server/game" +) + +var Info = game.GameInfo{ + Aliases: []game.GameAlias{ + {Prov: "AGT", Name: "Halloween"}, + }, + GP: game.GPfgno, + SX: 3, + SY: 3, + SN: len(LinePay), + LN: len(BetLines), + BN: 0, + RTP: game.MakeRtpList(ReelsMap), +} + +func init() { + Info.SetupFactory(func() any { return NewGame() }, CalcStat) +} diff --git a/game/slot/agt/halloween/halloween_reel.yaml b/game/slot/agt/halloween/halloween_reel.yaml new file mode 100644 index 00000000..18f52437 --- /dev/null +++ b/game/slot/agt/halloween/halloween_reel.yaml @@ -0,0 +1,196 @@ + +# reels lengths [49, 49, 49], total reshuffles 117649 +# RTP = 83.825617% +83.825617: + - [8, 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 2, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6] + - [1, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 8, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2] + - [2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 8, 2, 1, 4, 4, 4, 4, 4, 1, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7] + +# reels lengths [49, 48, 49], total reshuffles 115248 +# RTP = 85.138137% +85.138137: + - [8, 2, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 2, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6] + - [6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 5, 1] + - [2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 8, 2, 1, 4, 4, 4, 4, 4, 1, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7] + +# reels lengths [48, 49, 48], total reshuffles 112896 +# RTP = 86.513251% +86.513251: + - [6, 6, 6, 6, 6, 6, 6, 6, 2, 3, 3, 3, 3, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 2, 5, 5, 5, 5, 5, 5, 5, 2] + - [1, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 8, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 4, 4, 4, 4, 4, 3, 3, 3, 3, 2] + - [8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 5, 5, 5, 5, 5, 5, 5, 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 2, 1, 3, 3, 3, 3] + +# reels lengths [48, 48, 48], total reshuffles 110592 +# RTP = 87.949400% +87.949400: + - [6, 6, 6, 6, 6, 6, 6, 6, 2, 3, 3, 3, 3, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 2, 5, 5, 5, 5, 5, 5, 5, 2] + - [6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 5, 1] + - [8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 5, 5, 5, 5, 5, 5, 5, 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 2, 1, 3, 3, 3, 3] + +# reels lengths [48, 47, 48], total reshuffles 108288 +# RTP = 88.463172% +88.463172: + - [6, 6, 6, 6, 6, 6, 6, 6, 2, 3, 3, 3, 3, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 2, 5, 5, 5, 5, 5, 5, 5, 2] + - [4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 2, 5, 5, 5, 5, 5, 5, 2, 1, 2, 1] + - [8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 5, 5, 5, 5, 5, 5, 5, 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 2, 1, 3, 3, 3, 3] + +# reels lengths [47, 48, 47], total reshuffles 106032 +# RTP = 89.157047% +89.157047: + - [2, 1, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 2, 1, 2, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 6, 6, 6, 6, 6, 6, 6, 6] + - [6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 3, 3, 3, 3, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 5, 1] + - [3, 3, 3, 3, 2, 1, 2, 5, 5, 5, 5, 5, 5, 1, 6, 6, 6, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2] + +# reels lengths [47, 47, 47], total reshuffles 103823 +# RTP = 90.013773% +90.013773: + - [2, 1, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 2, 1, 2, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 6, 6, 6, 6, 6, 6, 6, 6] + - [4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 2, 5, 5, 5, 5, 5, 5, 2, 1, 2, 1] + - [3, 3, 3, 3, 2, 1, 2, 5, 5, 5, 5, 5, 5, 1, 6, 6, 6, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2] + +# reels lengths [47, 47, 47], total reshuffles 103823 +# RTP = 90.793947% +90.793947: + - [4, 4, 4, 4, 4, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 5, 5, 5, 5, 5, 5, 5, 1, 3, 3, 3, 3, 1, 2] + - [4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 2, 5, 5, 5, 5, 5, 5, 2, 1, 2, 1] + - [5, 5, 5, 5, 5, 5, 5, 1, 2, 6, 6, 6, 6, 6, 6, 6, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 2, 3, 3, 3, 3, 1] + +# reels lengths [47, 47, 47], total reshuffles 103823 +# RTP = 91.593385% +91.593385: + - [4, 4, 4, 4, 4, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 5, 5, 5, 5, 5, 5, 5, 1, 3, 3, 3, 3, 1, 2] + - [8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 3, 3, 3, 3, 1, 2, 1, 2, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7] + - [5, 5, 5, 5, 5, 5, 5, 1, 2, 6, 6, 6, 6, 6, 6, 6, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 2, 3, 3, 3, 3, 1] + +# reels lengths [46, 46, 46], total reshuffles 97336 +# RTP = 92.540273% +92.540273: + - [1, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7] + - [1, 2, 4, 4, 4, 4, 4, 2, 6, 6, 6, 6, 6, 6, 6, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 3, 3, 3, 3] + - [7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 5, 5, 5, 5, 2, 1, 3, 3, 3, 3, 1] + +# reels lengths [46, 46, 46], total reshuffles 97336 +# RTP = 93.208063% +93.208063: + - [5, 5, 5, 5, 5, 2, 1, 2, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 1, 2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7] + - [5, 5, 5, 5, 5, 2, 1, 2, 6, 6, 6, 6, 6, 6, 6, 6, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 1, 2] + - [5, 5, 5, 5, 5, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 3, 3, 3, 3, 1, 4, 4, 4, 4, 4] + +# reels lengths [46, 46, 46], total reshuffles 97336 +# RTP = 93.783389% +93.783389: + - [2, 1, 2, 1, 3, 3, 3, 3, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 1, 2, 6, 6, 6, 6, 6, 6, 6, 6] + - [2, 1, 5, 5, 5, 5, 5, 5, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 2] + - [6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 5, 5, 5, 5, 5, 5, 2, 1, 4, 4, 4, 4, 4, 1, 2, 1, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7] + +# reels lengths [46, 46, 46], total reshuffles 97336 +# RTP = 94.225158% +94.225158: + - [5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 2, 4, 4, 4, 4, 4, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3] + - [5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 2, 4, 4, 4, 4, 4, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3] + - [5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 2, 4, 4, 4, 4, 4, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3] + +# reels lengths [45, 46, 45], total reshuffles 93150 +# RTP = 94.949007% +94.949007: + - [1, 3, 3, 3, 3, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 1] + - [5, 5, 5, 5, 5, 2, 1, 2, 6, 6, 6, 6, 6, 6, 6, 6, 1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 1, 2] + - [2, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 3, 3, 3, 3, 2, 1, 4, 4, 4, 4, 4, 1, 6, 6, 6, 6, 6, 6, 6, 1] + +# reels lengths [45, 46, 45], total reshuffles 93150 +# RTP = 95.528717% +95.528717: + - [1, 3, 3, 3, 3, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 1] + - [5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 2, 4, 4, 4, 4, 4, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3] + - [2, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 3, 3, 3, 3, 2, 1, 4, 4, 4, 4, 4, 1, 6, 6, 6, 6, 6, 6, 6, 1] + +# reels lengths [45, 45, 45], total reshuffles 91125 +# RTP = 95.851852% +95.851852: + - [1, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 6, 6, 6, 6, 6, 6, 6, 1, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 3, 3, 3, 3, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2] + - [2, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 2, 1, 2, 5, 5, 5, 5, 5, 3, 3, 3, 3] + - [6, 6, 6, 6, 6, 6, 6, 1, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 3, 3, 3, 3, 1, 2] + +# reels lengths [45, 45, 45], total reshuffles 91125 +# RTP = 95.983539% +95.983539: + - [1, 3, 3, 3, 3, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 1] + - [2, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 2, 1, 2, 5, 5, 5, 5, 5, 3, 3, 3, 3] + - [2, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 3, 3, 3, 3, 2, 1, 4, 4, 4, 4, 4, 1, 6, 6, 6, 6, 6, 6, 6, 1] + +# reels lengths [45, 45, 45], total reshuffles 91125 +# RTP = 96.466392% +96.466392: + - [1, 3, 3, 3, 3, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 1] + - [2, 1, 5, 5, 5, 5, 5, 5, 1, 4, 4, 4, 4, 4, 2, 3, 3, 3, 3, 2, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 1] + - [2, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 3, 3, 3, 3, 2, 1, 4, 4, 4, 4, 4, 1, 6, 6, 6, 6, 6, 6, 6, 1] + +# reels lengths [45, 45, 45], total reshuffles 91125 +# RTP = 97.179698% +97.179698: + - [2, 6, 6, 6, 6, 6, 6, 6, 6, 1, 2, 3, 3, 3, 3, 5, 5, 5, 5, 5, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7] + - [2, 6, 6, 6, 6, 6, 6, 6, 6, 1, 2, 3, 3, 3, 3, 5, 5, 5, 5, 5, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7] + - [2, 6, 6, 6, 6, 6, 6, 6, 6, 1, 2, 3, 3, 3, 3, 5, 5, 5, 5, 5, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7] + +# reels lengths [45, 45, 45], total reshuffles 91125 +# RTP = 98.984911% +98.984911: + - [1, 5, 5, 5, 5, 5, 5, 1, 3, 3, 3, 3, 2, 1, 7, 7, 7, 7, 7, 7, 7, 7, 2, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2] + - [3, 3, 3, 3, 2, 1, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 1, 2, 8, 8, 8, 8, 8, 8, 8, 8, 5, 5, 5, 5, 5, 5, 2] + - [3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 1] + +# reels lengths [44, 44, 44], total reshuffles 85184 +# RTP = 99.555081% +99.555081: + - [8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 5, 5, 5, 5, 5, 2, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 4, 4, 4, 4, 4, 1] + - [6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 3, 3, 3, 3, 1, 4, 4, 4, 4, 4, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 5, 5, 5, 5, 5, 1, 2] + - [1, 5, 5, 5, 5, 5, 2, 3, 3, 3, 3, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 7, 2, 1, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8] + +# reels lengths [46, 45, 46], total reshuffles 95220 +# RTP = 100.294056% +100.294056: + - [6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 2, 1, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 1, 3, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8] + - [1, 2, 1, 3, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 5, 2, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 1] + - [6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 2, 1, 2, 1, 2, 1] + +# reels lengths [44, 44, 44], total reshuffles 85184 +# RTP = 101.333584% +101.333584: + - [1, 5, 5, 5, 5, 5, 5, 5, 1, 2, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 3, 3, 3, 3, 1, 6, 6, 6, 6, 6, 6, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2] + - [6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 3, 3, 3, 3, 1, 4, 4, 4, 4, 4, 2, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 5, 5, 5, 5, 5, 1, 2] + - [2, 3, 3, 3, 3, 2, 5, 5, 5, 5, 5, 5, 5, 1, 2, 1, 4, 4, 4, 4, 4, 1, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6] + +# reels lengths [46, 46, 46], total reshuffles 97336 +# RTP = 102.017753% +102.017753: + - [6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 2, 1, 2, 1, 2, 7, 7, 7, 7, 7, 7, 7, 7, 5, 5, 5, 5, 5, 5, 1, 3, 3, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8] + - [1, 2, 6, 6, 6, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, 1, 8, 8, 8, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 2, 3, 3, 3, 3] + - [6, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 3, 3, 3, 3, 2, 1, 2, 1, 2, 1] + +# reels lengths [44, 44, 44], total reshuffles 85184 +# RTP = 104.409279% +104.409279: + - [1, 5, 5, 5, 5, 5, 5, 5, 1, 2, 7, 7, 7, 7, 7, 7, 7, 4, 4, 4, 4, 4, 3, 3, 3, 3, 1, 6, 6, 6, 6, 6, 6, 6, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2] + - [1, 5, 5, 5, 5, 5, 5, 5, 2, 6, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 3, 3, 3, 3, 1, 2, 1, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 2] + - [2, 3, 3, 3, 3, 2, 5, 5, 5, 5, 5, 5, 5, 1, 2, 1, 4, 4, 4, 4, 4, 1, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6] + +# reels lengths [43, 43, 43], total reshuffles 79507 +# RTP = 107.072333% +107.072333: + - [4, 4, 4, 4, 4, 3, 3, 3, 3, 2, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 1, 5, 5, 5, 5, 5, 5, 1, 6, 6, 6, 6, 6, 6, 6, 2, 1, 2] + - [5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 1, 7, 7, 7, 7, 7, 7, 7, 1, 6, 6, 6, 6, 6, 6, 6, 1, 2, 3, 3, 3, 3, 2, 8, 8, 8, 8, 8, 8, 8, 8, 2] + - [6, 6, 6, 6, 6, 6, 6, 2, 1, 3, 3, 3, 3, 1, 4, 4, 4, 4, 4, 2, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 1, 7, 7, 7, 7, 7, 7, 7, 2] + +# reels lengths [42, 42, 42], total reshuffles 74088 +# RTP = 111.475543% +111.475543: + - [6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 2, 1, 2, 1, 2, 4, 4, 4, 4, 4, 1, 8, 8, 8, 8, 8, 8, 8, 8] + - [2, 1, 2, 1, 3, 3, 3, 3, 7, 7, 7, 7, 7, 7, 7, 1, 8, 8, 8, 8, 8, 8, 8, 8, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5] + - [8, 8, 8, 8, 8, 8, 8, 8, 2, 4, 4, 4, 4, 4, 2, 1, 3, 3, 3, 3, 1, 6, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 2, 7, 7, 7, 7, 7, 7, 7, 1] + +# reels lengths [42, 42, 42], total reshuffles 74088 +# RTP = 113.763362% +113.763362: + - [2, 1, 3, 3, 3, 3, 1, 4, 4, 4, 4, 4, 2, 8, 8, 8, 8, 8, 8, 8, 2, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7] + - [8, 8, 8, 8, 8, 8, 8, 1, 2, 7, 7, 7, 7, 7, 7, 7, 2, 4, 4, 4, 4, 4, 2, 1, 5, 5, 5, 5, 5, 5, 1, 3, 3, 3, 3, 6, 6, 6, 6, 6, 6, 6] + - [8, 8, 8, 8, 8, 8, 8, 6, 6, 6, 6, 6, 6, 6, 1, 7, 7, 7, 7, 7, 7, 7, 1, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 2, 1, 2, 4, 4, 4, 4, 4, 2] diff --git a/game/slot/agt/halloween/halloween_rule.go b/game/slot/agt/halloween/halloween_rule.go new file mode 100644 index 00000000..65c15e35 --- /dev/null +++ b/game/slot/agt/halloween/halloween_rule.go @@ -0,0 +1,82 @@ +package halloween + +// See: https://demo.agtsoftware.com/games/agt/halloween + +import ( + _ "embed" + + "github.com/slotopol/server/game/slot" +) + +//go:embed halloween_reel.yaml +var reels []byte + +var ReelsMap = slot.ReadMap[*slot.Reels3x](reels) + +// Lined payment. +var LinePay = [8]float64{ + 1000, // 1 pumpkin + 500, // 2 witch + 200, // 3 castle + 100, // 4 scarecrow + 30, // 5 ghost + 20, // 6 spider + 10, // 7 skeleton + 5, // 8 candles +} + +// Bet lines +var BetLines = []slot.Linex{ + {2, 2, 2}, // 1 + {1, 1, 1}, // 2 + {3, 3, 3}, // 3 + {1, 2, 3}, // 4 + {3, 2, 1}, // 5 + {1, 2, 1}, // 6 + {2, 3, 2}, // 7 + {2, 1, 2}, // 8 + {3, 2, 3}, // 9 + {2, 2, 1}, // 10 +} + +type Game struct { + slot.Slot3x3 `yaml:",inline"` +} + +// Declare conformity with SlotGame interface. +var _ slot.SlotGame = (*Game)(nil) + +func NewGame() *Game { + return &Game{ + Slot3x3: slot.Slot3x3{ + Sel: len(BetLines), + Bet: 1, + }, + } +} + +func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) { + for li := 1; li <= g.Sel; li++ { + var line = BetLines[li-1] + var sym1, sym2, sym3 = screen.Pos(1, line), screen.Pos(2, line), screen.Pos(3, line) + if sym1 == sym2 && sym1 == sym3 { + *wins = append(*wins, slot.WinItem{ + Pay: g.Bet * LinePay[sym1-1], + Mult: 1, + Sym: sym1, + Num: 3, + Line: li, + XY: line, // whole line is used + }) + } + } +} + +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 slot.ErrNoFeature +} diff --git a/go.mod b/go.mod index 9e0eb105..d2a8f285 100644 --- a/go.mod +++ b/go.mod @@ -54,7 +54,7 @@ require ( golang.org/x/arch v0.12.0 // indirect golang.org/x/crypto v0.31.0 // indirect golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect - golang.org/x/net v0.32.0 // indirect + golang.org/x/net v0.33.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect google.golang.org/protobuf v1.36.0 // indirect diff --git a/go.sum b/go.sum index 452eabb8..8eaaec74 100644 --- a/go.sum +++ b/go.sum @@ -150,8 +150,8 @@ golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudw golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= diff --git a/helper/halloween.lua b/helper/halloween.lua new file mode 100644 index 00000000..0cc8b221 --- /dev/null +++ b/helper/halloween.lua @@ -0,0 +1,28 @@ +local path = arg[0]:match("(.*[/\\])") +dofile(path.."lib/reelgen.lua") + +local symset = { + 3, -- 1 pumpkin 1000 + 3, -- 2 witch 500 + 4, -- 3 castle 200 + 5, -- 4 scarecrow 100 + 7, -- 5 ghost 30 + 8, -- 6 spider 20 + 9, -- 7 skeleton 10 + 10, -- 8 candles 5 +} + +local chunklen = { + 1, -- 1 pumpkin + 1, -- 2 witch + 9, -- 3 castle + 9, -- 4 scarecrow + 9, -- 5 ghost + 9, -- 6 spider + 9, -- 7 skeleton + 9, -- 8 candles +} + +math.randomseed(os.time()) +local reel, iter = makereelhot(symset, 3, {}, chunklen, true) +printreel(reel, iter)