ArchipIDLE: add a completion condition instead of hard coding tests around a game (#1444)
This commit is contained in:
parent
cb3d40624c
commit
1d6ab13015
|
@ -8,7 +8,7 @@ class TestImplemented(unittest.TestCase):
|
|||
def testCompletionCondition(self):
|
||||
"""Ensure a completion condition is set that has requirements."""
|
||||
for game_name, world_type in AutoWorldRegister.world_types.items():
|
||||
if not world_type.hidden and game_name not in {"ArchipIDLE", "Sudoku"}:
|
||||
if not world_type.hidden and game_name not in {"Sudoku"}:
|
||||
with self.subTest(game_name):
|
||||
multiworld = setup_solo_multiworld(world_type)
|
||||
self.assertFalse(multiworld.completion_condition[1](multiworld.state))
|
||||
|
|
|
@ -31,3 +31,7 @@ def set_rules(world: MultiWorld, player: int):
|
|||
world.get_location(f"IDLE for at least {int(i / 2)} minutes {30 if (i % 2) else 0} seconds", player),
|
||||
lambda state: state._archipidle_location_is_accessible(player, 20)
|
||||
)
|
||||
|
||||
world.completion_condition[player] =\
|
||||
lambda state:\
|
||||
state.can_reach(world.get_location("IDLE for at least 50 minutes 0 seconds", player), "Location", player)
|
||||
|
|
Loading…
Reference in New Issue