From 7f36158c40443b902e569869e32cc5d428cbeaa829a9074736d5c54b3bb862c2 Mon Sep 17 00:00:00 2001 From: andrea Date: Sat, 2 Aug 2025 00:07:22 +0200 Subject: [PATCH] fix double kill on an already death player --- debug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debug.py b/debug.py index 0e59028..42d49e9 100644 --- a/debug.py +++ b/debug.py @@ -53,7 +53,7 @@ def _random_action(Arena, Player_one): # so Player_two is no more random, but will be a random near player preys= avail_actions[1] Player_two= _rand.sample(preys, 1)[0] - while Player_one.get_id() == Player_two.get_id(): + while Player_one.get_id() == Player_two.get_id() and not Player_two.is_alive(): Player_two= _rand.sample(preys, 1)[0] _dmg, msg= Player_one.attack(Player_two) elif 2 in avail_actions: