speed up connecting single-doors
This commit is contained in:
parent
5e8b4ac3ce
commit
a7cbb440d1
|
@ -2054,10 +2054,11 @@ def connect_doors(world, doors, targets, player):
|
|||
"""This works inplace"""
|
||||
world.random.shuffle(doors)
|
||||
world.random.shuffle(targets)
|
||||
while doors:
|
||||
door = doors.pop()
|
||||
target = targets.pop()
|
||||
placing = min(len(doors), len(targets))
|
||||
for door, target in zip(doors, targets):
|
||||
connect_entrance(world, door, target, player)
|
||||
doors[:] = doors[placing:]
|
||||
targets[:] = targets[placing:]
|
||||
|
||||
|
||||
def skull_woods_shuffle(world, player):
|
||||
|
|
Loading…
Reference in New Issue