Skip to content

Commit

Permalink
solution
Browse files Browse the repository at this point in the history
  • Loading branch information
yurafrits13102001 committed Nov 29, 2024
1 parent 158e925 commit 0893f17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def __init__(self, name: str, health: int = 100) -> None:
Animal.alive.append(self)

def __repr__(self) -> str:
return f"{{Name: {self.name}, Health: {self.health}, Hidden: {self.hidden}}}"
return (f"{{Name: {self.name}, "
f"Health: {self.health}, Hidden: {self.hidden}}}")

@classmethod
def update_alive(cls) -> None:
Expand All @@ -27,5 +28,3 @@ def bite(self, prey: "Animal") -> None:
prey.health -= 50
if prey.health <= 0:
Animal.update_alive()


0 comments on commit 0893f17

Please sign in to comment.