Reglage des problemes avec les bonnus #25

Merged
tipragot merged 3 commits from fix-bonus-probleme into main 2024-01-07 10:43:04 +00:00
Showing only changes of commit df4b694155 - Show all commits

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())