From 80ae824ed8b7a068d4ca32e1d816d63f4712c81f Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 19 Nov 2020 01:13:46 +0100 Subject: [PATCH] Fix concurrent access to entity list issue --- dungeonbattle/entities/items.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dungeonbattle/entities/items.py b/dungeonbattle/entities/items.py index 8811905..9927ef4 100644 --- a/dungeonbattle/entities/items.py +++ b/dungeonbattle/entities/items.py @@ -94,7 +94,7 @@ class Bomb(Item): Special exploding action of the bomb """ if self.exploding: - for e in m.entities: + for e in m.entities.copy(): if abs(e.x - self.x) + abs(e.y - self.y) <= 1 and \ isinstance(e, FightingEntity): e.take_damage(self, self.damage)