mirror of
https://github.com/ethanrusz/scouter.git
synced 2025-04-20 14:06:32 -04:00
Compare commits
No commits in common. "11b003bca44c885f10f07e50c421fe8b868b9358" and "9da44817500a70527bf021b739a54e0194b2dca6" have entirely different histories.
11b003bca4
...
9da4481750
1 changed files with 2 additions and 9 deletions
11
app.py
11
app.py
|
@ -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():
|
||||||
|
|
Loading…
Add table
Reference in a new issue