fix le probleme d'attribution des bonnus

This commit is contained in:
CoCo_Sol 2024-01-07 11:36:47 +01:00
parent d668dc9c4b
commit df4b694155

View file

@ -369,7 +369,7 @@ def __spawn_ball(world: World):
def __collision_with_ball(a: Entity, b: Entity):
if Ball in a:
a.world.new_entity().set(Sound("bound.mp3"))
if Player1 in b or Player2 in b:
if Player1 in b or Player2 in b and Ball in a:
for player in a.world.query(LastPlayerTurn):
del player[LastPlayerTurn]
b.set(LastPlayerTurn())