Compare commits

..

No commits in common. "11b003bca44c885f10f07e50c421fe8b868b9358" and "9da44817500a70527bf021b739a54e0194b2dca6" have entirely different histories.

11
app.py
View file

@ -25,23 +25,16 @@ class Run:
self.outside_power = moon.outside_max_power self.outside_power = moon.outside_max_power
def find_spawnlist(remaining_power: int, creatures: list[Creature]) -> list[str] | None: def find_spawnlist(remaining_power: int, creatures: list[Creature]) -> list[str]:
""" """
Given a run, return all possible spwns for location. Given a run, return all possible spwns for location.
:param remaining_power: The remaining power in the current location. :param remaining_power: The remaining power in the current location.
:return: A list of all creatures that may still spawn. :return: A list of all creatures that may still spawn.
""" """
if remaining_power == 0: return sorted(
return None
spawnable = sorted(
[creature.name for creature in creatures if creature.power <= remaining_power] [creature.name for creature in creatures if creature.power <= remaining_power]
) )
if spawnable != []:
return spawnable
else:
return None
def main(): def main():