Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanyemets committed Dec 10, 2024
1 parent 9ae581d commit 136405e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ class Carnivore(Animal):
def bite(herbivore: Herbivore) -> None:
if isinstance(herbivore, Herbivore) and not herbivore.hidden:
herbivore.health -= 50
if herbivore.health <= 0:
if herbivore.health <= 0 and herbivore in Animal.alive:
Animal.alive.remove(herbivore)

0 comments on commit 136405e

Please sign in to comment.