Skip to content

Commit

Permalink
Updated solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Wonsky1 authored Oct 10, 2023
1 parent 88f2a69 commit ce66ec4
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 @@ -22,8 +22,8 @@ def hide(self) -> None:

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

0 comments on commit ce66ec4

Please sign in to comment.