Skip to content

Commit

Permalink
Screenx.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarzlichtbezirk committed Sep 27, 2024
1 parent 8bc0f31 commit 747a5ec
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 61 deletions.
4 changes: 3 additions & 1 deletion game/slot/indiandreaming/indiandreaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,14 @@ func (g *Game) ScanScatters(screen slot.Screen, wins *slot.Wins) {
mw = 5
}
var pay = ScatPay[count-1]
var line = screen.ScatPos(scat)
line.Cover(screen.ScatPos(wild))
*wins = append(*wins, slot.WinItem{
Pay: g.Bet * pay,
Mult: mw,
Sym: scat,
Num: count,
XY: screen.ScatPos(scat),
XY: line,
Free: 12,
})
}
Expand Down
9 changes: 9 additions & 0 deletions game/slot/lines.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ func (l *Linex) Set(x Pos, val Pos) {
l[x-1] = val
}

func (l *Linex) Cover(op Linex) *Linex {
for i, v := range op {
if v > 0 {
l[i] = v
}
}
return l
}

func (l *Linex) Len() int {
for i := 7; i >= 0; i-- {
if l[i] > 0 {
Expand Down
Loading

0 comments on commit 747a5ec

Please sign in to comment.