Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
lurd22 committed Dec 21, 2024
1 parent 766c2eb commit d2167a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def __repr__(self) -> str:
f"Hidden: {self.hidden}}}"
)

@classmethod
def __str__(cls) -> str:
return str([str(animal) for animal in cls.alive])

Expand All @@ -32,7 +31,7 @@ def hide(self) -> None:

class Carnivore(Animal):

def bite(self, target: int) -> None:
def bite(self, target: Herbivore) -> None:
if isinstance(target, Herbivore) and not target.hidden:
target.health -= 50
if target.health <= 0:
Expand Down

0 comments on commit d2167a0

Please sign in to comment.