From 5a6003f3fe43a5d0452a946bcac520db612afb45 Mon Sep 17 00:00:00 2001 From: LassisterV16 Date: Tue, 11 Mar 2025 18:38:47 +0100 Subject: [PATCH] Fixed instance method --- app/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index 2d84d095..e0a5ca6e 100644 --- a/app/main.py +++ b/app/main.py @@ -30,10 +30,9 @@ def hide(self) -> None: class Carnivore(Animal): - @classmethod - def bite(cls, prey: Herbivore) -> None: + def bite(self, prey: Herbivore) -> None: if type(prey) is not Carnivore and not prey.hidden: prey.health -= 50 if prey.health <= 0: - cls.alive.remove(prey) + self.alive.remove(prey)