diff --git a/Bomberman/bomberman/world.py b/Bomberman/bomberman/world.py index 9a4458d2..92d24a62 100644 --- a/Bomberman/bomberman/world.py +++ b/Bomberman/bomberman/world.py @@ -149,6 +149,8 @@ def remove_character(self, character): i = self.index(character.x, character.y) if (i in self.characters) and (character in self.characters[i]): self.characters[i].remove(character) + if not self.characters[i]: + del self.characters[i] def check_blast(self, bomb, x, y): # Check if a wall has been hit