import pgzrun TITLE = "Paf l'oiseau" WIDTH = 400 HEIGHT = 708 def on_mouse_down(): print('Clic souris !') titi.speed = 0 tutu.speed = 0 def on_mouse_up(): print('Clic souris !') titi.speed = 1 tutu.speed = 1 def on_key_up(key): if key == key.UP: print("up!") titi.speed += 3 tutu.speed += 3 def draw(): screen.blit('cascade', (0, 0)) titi.draw() tutu.draw() def update(): titi.x += titi.speed tutu.x -= tutu.speed if titi.x > 400: titi.x = 0 if titi.x < 0: titi.x = 400 if tutu.x < 0: tutu.x = 400 if tutu.x > 400: tutu.x = 0 titi = Actor('bird1', (175, 350)) tutu = Actor('birdinverse', (75, 220)) titi.speed = 1 tutu.speed = 1 pgzrun.go()