diff --git a/app/main.py b/app/main.py index 796290ca..f2516311 100644 --- a/app/main.py +++ b/app/main.py @@ -31,7 +31,7 @@ def hide(self) -> None: class Carnivore(Animal): @staticmethod def bite(prey: Herbivore) -> None: - if not prey.hidden and isinstance(prey, Herbivore): + if isinstance(prey, Herbivore) and not prey.hidden: prey.health -= 50 if prey.health <= 0: prey.die()