Remove the starting room door only if it really shouldn't be here; also account for the new randomized placement in removing lone door tile

This commit is contained in:
Charles Peyrat 2021-01-08 15:18:13 +01:00
parent 8d7e264381
commit dab84738d9
1 changed files with 2 additions and 1 deletions

View File

@ -162,7 +162,8 @@ class Generator:
dim_v, dim_h = len(starting_room), len(starting_room[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) 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) self.place_room(level, pos_y, pos_x, starting_room, 0, 0)
level[0][0] = Tile.EMPTY if starting_room[0][0] != Tile.FLOOR:
level[pos_y][pos_x] = Tile.EMPTY
self.params["corridor_chance"] = mem self.params["corridor_chance"] = mem
# find a starting position # find a starting position