Skip to content

Commit

Permalink
fixed solution
Browse files Browse the repository at this point in the history
  • Loading branch information
kostomeister committed Oct 10, 2023
1 parent 946c3a4 commit c6bf90b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class Carnivore(Animal):

def bite(self, herbivore: Animal) -> None:
if isinstance(herbivore, Herbivore) and not herbivore.hidden:
if herbivore.health <= 0:
herbivore.die_animal()
herbivore.health -= 50

if herbivore.health <= 0:
herbivore.die_animal()

0 comments on commit c6bf90b

Please sign in to comment.