Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
mykolamateichuk committed Oct 8, 2023
1 parent ae4cf1a commit c113be5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def hide(self) -> None:


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

0 comments on commit c113be5

Please sign in to comment.