diff --git a/squirrelbattle/mapgeneration/broguelike.py b/squirrelbattle/mapgeneration/broguelike.py index 44a5716..02fc736 100644 --- a/squirrelbattle/mapgeneration/broguelike.py +++ b/squirrelbattle/mapgeneration/broguelike.py @@ -159,7 +159,9 @@ class Generator: # the starting room must have no corridor mem, self.params["corridor_chance"] = self.params["corridor_chance"], 0 starting_room, _, _, _, _ = self.create_random_room() - self.place_room(level, height//2, width//2, starting_room, 0, 0) + dim_v, dim_h = len(starting_room), len(starting_room[0]) + pos_y, pos_x = randint(0, height-dim_v-1), randint(0, width-dim_h-1) + self.place_room(level, pos_y, pos_x, starting_room, 0, 0) level[0][0] = Tile.EMPTY self.params["corridor_chance"] = mem