Skip to content

Commit

Permalink
Tests: add can_reach_region method to WorldTestBase (ArchipelagoMW#2274)
Browse files Browse the repository at this point in the history
  • Loading branch information
alwaysintreble authored Oct 8, 2023
1 parent 5591879 commit fd93f6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/TestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,16 @@ def remove(self, items: typing.Union[Item, typing.Iterable[Item]]) -> None:
self.multiworld.state.remove(item)

def can_reach_location(self, location: str) -> bool:
"""Determines if the current state can reach the provide location name"""
"""Determines if the current state can reach the provided location name"""
return self.multiworld.state.can_reach(location, "Location", 1)

def can_reach_entrance(self, entrance: str) -> bool:
"""Determines if the current state can reach the provided entrance name"""
return self.multiworld.state.can_reach(entrance, "Entrance", 1)

def can_reach_region(self, region: str) -> bool:
"""Determines if the current state can reach the provided region name"""
return self.multiworld.state.can_reach(region, "Region", 1)

def count(self, item_name: str) -> int:
"""Returns the amount of an item currently in state"""
Expand Down

0 comments on commit fd93f6e

Please sign in to comment.