From 136405eabfd6bf4ff2465beab7356c62a902f402 Mon Sep 17 00:00:00 2001 From: Ruslan Date: Tue, 10 Dec 2024 12:32:00 +0200 Subject: [PATCH] Solution --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index af369a78..34696283 100644 --- a/app/main.py +++ b/app/main.py @@ -30,5 +30,5 @@ class Carnivore(Animal): def bite(herbivore: Herbivore) -> None: if isinstance(herbivore, Herbivore) and not herbivore.hidden: herbivore.health -= 50 - if herbivore.health <= 0: + if herbivore.health <= 0 and herbivore in Animal.alive: Animal.alive.remove(herbivore)