mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
The Witness: Fix nondeterministic entity hunt (#3892)
In `_get_next_random_batch()`, the `remaining_entities` and `remaining_entity_weights` lists were being constructed by iterating sets. This patch changes the function to iterate a sorted copy of each set instead.
This commit is contained in:
@@ -145,7 +145,7 @@ class EntityHuntPicker:
|
||||
|
||||
remaining_entities, remaining_entity_weights = [], []
|
||||
for area, eligible_entities in self.ELIGIBLE_ENTITIES_PER_AREA.items():
|
||||
for panel in eligible_entities - self.HUNT_ENTITIES:
|
||||
for panel in sorted(eligible_entities - self.HUNT_ENTITIES):
|
||||
remaining_entities.append(panel)
|
||||
remaining_entity_weights.append(allowance_per_area[area])
|
||||
|
||||
|
Reference in New Issue
Block a user