From b25544f4a282a0fa72c823af6cf65424c4b36c85 Mon Sep 17 00:00:00 2001 From: Melissa Date: Mon, 7 Dec 2020 20:21:02 +0100 Subject: [PATCH] challenge 6 --- birdie.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/birdie.py b/birdie.py index a863f0a..f33e760 100644 --- a/birdie.py +++ b/birdie.py @@ -5,9 +5,13 @@ WIDTH = 400 HEIGHT = 708 direction = 1 -def on_mouse_down(): - print('Stop!') - titi.speed = 1 +def on_mouse_down(button): + if button == mouse.LEFT: + print('freinage') + titi.speed -= 1 + elif button == mouse.RIGHT: + print('accélaration') + titi.speed += 1 def on_mouse_up(): titi.speed = 1