Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna-Bordonos17 committed Oct 15, 2023
1 parent a106467 commit 447ab48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def hide(self) -> None:

class Carnivore(Animal):
@staticmethod
def bite(animal: Herbivore) -> None:
if not animal.hidden and isinstance(animal, Herbivore):
animal.health -= 50
if animal.health <= 0:
Animal.alive.remove(animal)
def bite(creature: Animal) -> None:
if not creature.hidden and isinstance(creature, Herbivore):
creature.health -= 50
if creature.health <= 0:
Animal.alive.remove(creature)

0 comments on commit 447ab48

Please sign in to comment.