-
Notifications
You must be signed in to change notification settings - Fork 17
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
19d494a
commit 8a401e4
Showing
14 changed files
with
463 additions
and
22 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
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,29 @@ | ||
package valentinesday | ||
|
||
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.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 | ||
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("RTP = %.5g(lined) + %.5g(scatter) = %.6f%%\n", lrtp, srtp, rtpsym) | ||
return rtpsym | ||
} |
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,26 @@ | ||
//go:build !prod || full || agt | ||
|
||
package valentinesday | ||
|
||
import ( | ||
"github.com/slotopol/server/game" | ||
) | ||
|
||
var Info = game.GameInfo{ | ||
Aliases: []game.GameAlias{ | ||
{Prov: "AGT", Name: "Valentine's Day"}, | ||
}, | ||
GP: game.GPfgno | | ||
game.GPscat | | ||
game.GPfill, | ||
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) | ||
} |
Oops, something went wrong.