import pgzrun TITLE = "Paf l'oiseau" WIDTH = 400 HEIGHT = 708 def on_mouse_down(button): print('Clic', button) if button == mouse.RIGHT : titi.speed += 1 elif button == mouse.LEFT : titi.speed -= 1 def update(): titi.x += titi.speed if titi.left > WIDTH : titi.right = 0 if titi.right < 0 : titi.left = WIDTH def draw(): screen.blit('background', (0, 0)) titi.draw() titi = Actor('bird1', (75, 350)) titi.speed = 1 pgzrun.go()