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: