Skip to content

Commit

Permalink
agt/cherryhot recalculated.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarzlichtbezirk committed Dec 29, 2024
1 parent 8a401e4 commit 7d6c932
Show file tree
Hide file tree
Showing 10 changed files with 378 additions and 352 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ EXPOSE 8080

# Run application with full path representation.
# Without shell to get signal for graceful shutdown.
ENTRYPOINT ["/go/bin/slot_linux_x64", "web"]
ENTRYPOINT ["/go/bin/app", "web"]
290 changes: 210 additions & 80 deletions game/slot/agt/cherryhot/cherryhot_reel.yaml

Large diffs are not rendered by default.

70 changes: 35 additions & 35 deletions game/slot/agt/cherryhot/cherryhot_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ var ReelsMap = slot.ReadMap[*slot.Reels5x](reels)

// Lined payment.
var LinePay = [8][5]float64{
{0, 0, 20, 200, 1000}, // 1 strawberry
{0, 0, 8, 80, 200}, // 2 blueberry
{0, 0, 4.8, 12, 40}, // 3 plum
{0, 0, 4, 10, 40}, // 4 pear
{0, 0, 4, 10, 40}, // 5 peach
{0, 1, 3.2, 8, 32}, // 6 cherry
{0, 0, 1, 4, 20}, // 7 apple
{}, // 8 scatter
{0, 0, 100, 1000, 5000}, // 1 strawberry
{0, 0, 40, 400, 1000}, // 2 blueberry
{0, 0, 24, 60, 200}, // 3 plum
{0, 0, 20, 50, 200}, // 4 pear
{0, 0, 20, 50, 200}, // 5 peach
{0, 5, 16, 40, 160}, // 6 cherry
{0, 0, 5, 20, 100}, // 7 apple
{}, // 8 scatter
}

// Scatters payment.
Expand All @@ -49,36 +49,33 @@ func NewGame() *Game {

const scat = 8

var Special = map[slot.Sym]bool{
1: false, // 1 strawberry
2: false, // 2 blueberry
3: true, // 3 plum
4: true, // 4 pear
5: true, // 5 peach
6: true, // 6 cherry
7: false, // 7 apple
8: false, // 8 scatter
}

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

// Lined symbols calculation.
func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) {
var ms float64 = 1 // mult screen
if symm := screen.At(1, 1); Special[symm] {
var x slot.Pos
for x = 1; x <= 5; x++ {
if screen.At(x, 1) != symm || screen.At(x, 2) != symm || screen.At(x, 3) != symm {
break
}
}
if x > 3 {
ms = float64(x - 1)
func FillMult(screen *slot.Screen5x3) float64 {
var sym = screen[0][0]
if sym < 3 || sym > 6 {
return 1
}
var r *[3]slot.Sym
var i int
for i = 0; i < 5; i++ {
if r = &screen[i]; r[0] != sym || r[1] != sym || r[2] != sym {
break
}
}
if i < 3 {
return 1
}
return float64(i)
}

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

Expand All @@ -94,9 +91,12 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) {
}

if pay := LinePay[syml-1][numl-1]; pay > 0 {
if fm == 0 { // lazy calculation
fm = FillMult(screen)
}
*wins = append(*wins, slot.WinItem{
Pay: g.Bet * pay,
Mult: ms,
Mult: fm,
Sym: syml,
Num: numl,
Line: li,
Expand All @@ -107,7 +107,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) {
}

// Scatters calculation.
func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) {
func (g *Game) ScanScatters(screen *slot.Screen5x3, wins *slot.Wins) {
if count := screen.ScatNum(scat); count >= 3 {
var pay = ScatPay[count-1]
*wins = append(*wins, slot.WinItem{
Expand Down
130 changes: 60 additions & 70 deletions game/slot/agt/valentinesday/valentinesday_reel.yaml

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions game/slot/agt/valentinesday/valentinesday_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ func (g *Game) Scanner(screen slot.Screen, wins *slot.Wins) {

func FillMult(screen *slot.Screen5x3) float64 {
var sym = screen[2][1] // center symbol
if sym < 4 || sym > 7 {
return 1
}
var r *[3]slot.Sym
if r = &screen[2]; r[0] != sym || r[2] != sym {
return 1
}
var n float64 = 1
var n = 1
if r = &screen[1]; r[0] == sym && r[1] == sym && r[2] == sym {
n++
if r = &screen[0]; r[0] == sym && r[1] == sym && r[2] == sym {
Expand All @@ -77,7 +80,7 @@ func FillMult(screen *slot.Screen5x3) float64 {
if n < 3 {
return 1
}
return n - 1
return float64(n - 1)
}

// Lined symbols calculation.
Expand Down
42 changes: 36 additions & 6 deletions game/slot/novomatic/beetlemania/beetlemania_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,42 @@ const wild, scat = 1, 10
const jazz = 11

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

func ScatNumCont(scrn *slot.Screen5x3) (n slot.Pos) {
for x := 0; x < 5; x++ {
var r = scrn[x]
if r[0] == scat || r[1] == scat || r[2] == scat {
n++
} else {
break // scatters should be continuous
}
}
return
}

func ScatPosCont(scrn *slot.Screen5x3) (l slot.Linex) {
var x int
for x = 0; x < 5; x++ {
var r = scrn[x]
if r[0] == scat {
l[x] = 1
} else if r[1] == scat {
l[x] = 2
} else if r[2] == scat {
l[x] = 3
} else {
break // scatters should be continuous
}
}
return
}

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

Expand Down Expand Up @@ -140,7 +170,7 @@ func (g *Game) ScanLined(screen slot.Screen, wins *slot.Wins) {
}

// Scatters calculation.
func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) {
func (g *Game) ScanScatters(screen *slot.Screen5x3, wins *slot.Wins) {
if g.FSR > 0 {
var y slot.Pos
if screen.At(3, 1) == jazz {
Expand All @@ -164,14 +194,14 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) {
return
}

if count := screen.ScatNumCont(scat); count >= 3 {
if count := ScatNumCont(screen); count >= 3 {
var pay = ScatPay[count-1]
*wins = append(*wins, slot.WinItem{
Pay: g.Bet * float64(g.Sel) * pay,
Mult: 1,
Sym: scat,
Num: count,
XY: screen.ScatPosCont(scat),
XY: ScatPosCont(screen),
Free: 10,
})
}
Expand Down
2 changes: 1 addition & 1 deletion game/slot/playngo/fortuneteller/fortuneteller_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var Info = game.GameInfo{
SY: 3,
SN: len(LinePay),
LN: len(BetLines),
BN: 0,
BN: 1,
RTP: game.MakeRtpList(ReelsMap),
}

Expand Down
Loading

0 comments on commit 7d6c932

Please sign in to comment.