Skip to content

Commit

Permalink
bite conditions simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
Sel-Fisher committed Oct 9, 2023
1 parent 1110934 commit 6f8b53a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class Carnivore(Animal):
@staticmethod
def bite(target: Herbivore) -> None:
if not isinstance(target, Carnivore) and not target.hidden:
if target.health > 50:
target.health -= 50
elif target.health <= 50:
target.health = 0
target.health -= 50
if target.health <= 0:
Animal.alive.pop(Animal.alive.index(target))

0 comments on commit 6f8b53a

Please sign in to comment.