mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Add test for minimal accessibility
This commit is contained in:

committed by
Fabian Dill

parent
e5fedb90a6
commit
18d262c1ae
8
Fill.py
8
Fill.py
@@ -62,7 +62,7 @@ def fill_restrictive(world: MultiWorld, base_state: CollectionState, locations,
|
||||
# try swaping this item with previously placed items
|
||||
for(i, location) in enumerate(placements):
|
||||
placed_item = location.item
|
||||
# Unplaceable items can sometimes be swapped infinitely. Limit the
|
||||
# Unplaceable items can sometimes be swapped infinitely. Limit the
|
||||
# number of times we will swap an individual item to prevent this
|
||||
if swapped_items[placed_item.player, placed_item.name] > 0:
|
||||
continue
|
||||
@@ -74,8 +74,10 @@ def fill_restrictive(world: MultiWorld, base_state: CollectionState, locations,
|
||||
# Add this item to the exisiting placement, and
|
||||
# add the old item to the back of the queue
|
||||
spot_to_fill = placements.pop(i)
|
||||
swapped_items[placed_item.player, placed_item.name] += 1
|
||||
reachable_items[placed_item.player].appendleft(placed_item)
|
||||
swapped_items[placed_item.player,
|
||||
placed_item.name] += 1
|
||||
reachable_items[placed_item.player].appendleft(
|
||||
placed_item)
|
||||
itempool.append(placed_item)
|
||||
break
|
||||
else:
|
||||
|
Reference in New Issue
Block a user