fix double kill on an already death player
This commit is contained in:
2
debug.py
2
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
|
# so Player_two is no more random, but will be a random near player
|
||||||
preys= avail_actions[1]
|
preys= avail_actions[1]
|
||||||
Player_two= _rand.sample(preys, 1)[0]
|
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]
|
Player_two= _rand.sample(preys, 1)[0]
|
||||||
_dmg, msg= Player_one.attack(Player_two)
|
_dmg, msg= Player_one.attack(Player_two)
|
||||||
elif 2 in avail_actions:
|
elif 2 in avail_actions:
|
||||||
|
|||||||
Reference in New Issue
Block a user