Skip to content

Commit

Permalink
Prevent OOB focused room in autoplay
Browse files Browse the repository at this point in the history
  • Loading branch information
kettek committed Jun 30, 2024
1 parent 9881f83 commit c6d1cd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/game/gamebuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func (s *GameStateBuild) Update(g *Game) GameState {
j -= int(s.focusedRoom.size)
}
attempts++
if j >= 7 || attempts > 10 {
if j < 0 || j >= 7 || attempts > 10 {
break
}
}
Expand Down

0 comments on commit c6d1cd5

Please sign in to comment.