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