-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ac497b
commit 4841752
Showing
12 changed files
with
644 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
# reels lengths [34, 34, 34, 34, 34], total reshuffles 45435424 | ||
# symbols: 507.35(lined) + 1.8018(scatter) = 509.147554% | ||
# free spins 2722680, q = 0.059924, sq = 1/(1-q) = 1.063744 | ||
# free games frequency: 1/166.88 | ||
# RTP = sq*rtp(sym) = 1.0637*509.15 = 541.602642% | ||
- [10, 3, 9, 5, 6, 3, 7, 5, 9, 7, 6, 9, 2, 8, 4, 6, 8, 2, 10, 1, 9, 10, 8, 1, 7, 6, 4, 8, 3, 11, 5, 10, 4, 7] # 34 | ||
- [4, 9, 2, 7, 8, 5, 6, 1, 9, 3, 10, 7, 4, 10, 11, 7, 6, 8, 2, 7, 5, 9, 6, 8, 3, 10, 1, 6, 4, 8, 3, 9, 5, 10] # 34 | ||
- [6, 11, 5, 7, 9, 1, 10, 9, 3, 7, 4, 8, 2, 6, 5, 10, 1, 6, 8, 4, 10, 7, 8, 3, 6, 10, 5, 9, 3, 8, 9, 4, 7, 2] # 34 | ||
- [9, 7, 4, 8, 3, 9, 11, 4, 6, 10, 7, 3, 8, 10, 3, 6, 5, 9, 8, 2, 7, 1, 10, 5, 6, 1, 8, 2, 9, 4, 10, 5, 7, 6] # 34 | ||
- [9, 3, 8, 6, 4, 10, 8, 6, 5, 10, 4, 7, 2, 11, 4, 9, 8, 1, 7, 9, 3, 10, 5, 9, 1, 7, 8, 5, 6, 10, 3, 6, 7, 2] # 34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package dynastyofra | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"time" | ||
|
||
"github.com/slotopol/server/game/slot" | ||
) | ||
|
||
func CalcStatBon(ctx context.Context) float64 { | ||
var reels = ReelsBon | ||
var g = NewGame() | ||
var sln float64 = 1 | ||
g.Sel = int(sln) | ||
g.FSR = 10 // set free spins mode | ||
var s slot.Stat | ||
|
||
var dur = slot.ScanReels5x(ctx, &s, g, reels, | ||
time.Tick(2*time.Second), time.Tick(2*time.Second)) | ||
|
||
var reshuf = float64(s.Reshuffles) | ||
var lrtp, srtp = s.LinePay / reshuf / sln * 100, s.ScatPay / reshuf / sln * 100 | ||
var rtpsym = lrtp + srtp | ||
var q = float64(s.FreeCount) / reshuf | ||
var sq = 1 / (1 - q) | ||
var rtp = sq * rtpsym | ||
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, %d, %d], total reshuffles %d\n", | ||
len(reels.Reel(1)), len(reels.Reel(2)), len(reels.Reel(3)), len(reels.Reel(4)), len(reels.Reel(5)), reels.Reshuffles()) | ||
fmt.Printf("symbols: %.5g(lined) + %.5g(scatter) = %.6f%%\n", lrtp, srtp, rtpsym) | ||
fmt.Printf("free spins %d, q = %.5g, sq = 1/(1-q) = %.6f\n", s.FreeCount, q, sq) | ||
fmt.Printf("free games frequency: 1/%.5g\n", reshuf/float64(s.FreeHits)) | ||
fmt.Printf("RTP = sq*rtp(sym) = %.5g*%.5g = %.6f%%\n", sq, rtpsym, rtp) | ||
return rtp | ||
} | ||
|
||
func CalcStatReg(ctx context.Context, mrtp float64) float64 { | ||
fmt.Printf("*bonus reels calculations*\n") | ||
var rtpfs = CalcStatBon(ctx) | ||
if ctx.Err() != nil { | ||
return 0 | ||
} | ||
fmt.Printf("*regular reels calculations*\n") | ||
var reels, _ = slot.FindClosest(ReelsMap, mrtp) | ||
var g = NewGame() | ||
var sln float64 = 1 | ||
g.Sel = int(sln) | ||
var s slot.Stat | ||
|
||
var dur = slot.ScanReels5x(ctx, &s, g, reels, | ||
time.Tick(2*time.Second), time.Tick(2*time.Second)) | ||
|
||
var reshuf = float64(s.Reshuffles) | ||
var lrtp, srtp = s.LinePay / reshuf / sln * 100, s.ScatPay / reshuf / sln * 100 | ||
var rtpsym = lrtp + srtp | ||
var q = float64(s.FreeCount) / reshuf | ||
var sq = 1 / (1 - q) | ||
var rtp = rtpsym + q*rtpfs | ||
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, %d, %d], total reshuffles %d\n", | ||
len(reels.Reel(1)), len(reels.Reel(2)), len(reels.Reel(3)), len(reels.Reel(4)), len(reels.Reel(5)), reels.Reshuffles()) | ||
fmt.Printf("symbols: %.5g(lined) + %.5g(scatter) = %.6f%%\n", lrtp, srtp, rtpsym) | ||
fmt.Printf("free spins %d, q = %.5g, sq = 1/(1-q) = %.6f\n", s.FreeCount, q, sq) | ||
fmt.Printf("free games frequency: 1/%.5g\n", reshuf/float64(s.FreeHits)) | ||
fmt.Printf("RTP = %.5g(sym) + %.5g*%.5g(fg) = %.6f%%\n", rtpsym, q, rtpfs, rtp) | ||
return rtp | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//go:build !prod || full || novomatic | ||
|
||
package dynastyofra | ||
|
||
import ( | ||
"github.com/slotopol/server/game" | ||
) | ||
|
||
var Info = game.GameInfo{ | ||
Aliases: []game.GameAlias{ | ||
{Prov: "Novomatic", Name: "Dynasty of Ra"}, // see: https://www.slotsmate.com/software/novomatic/dynasty-of-ra | ||
}, | ||
GP: game.GPsel | | ||
game.GPretrig | | ||
game.GPfgreel | | ||
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() }, CalcStatReg) | ||
} |
Oops, something went wrong.