Skip to content

Commit

Permalink
Fix not incrementing attempts variable lol
Browse files Browse the repository at this point in the history
  • Loading branch information
kettek committed Jun 30, 2024
1 parent b62f818 commit 2fefb06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/game/room.go
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,11 @@ func GetOptionalRooms(storyLevel int, roomSpace int) []*RoomDef {
rooms := make([]*RoomDef, 0)
attempts := 0
for i := 0; i < roomSpace; {
attempts++
room := potentialRooms[rand.Intn(len(potentialRooms))]

if i+int(room.size) > roomSpace {
if attempts > 10 {
if attempts > 11 {
break
}
continue
Expand Down

0 comments on commit 2fefb06

Please sign in to comment.