From bddfb668e866bcfae2214c7d9504c177af78d2ff Mon Sep 17 00:00:00 2001 From: valdoucet Date: Mon, 7 Dec 2020 18:30:08 +0100 Subject: [PATCH] modification du code --- code.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/code.py b/code.py index d3078b6..b4f815a 100644 --- a/code.py +++ b/code.py @@ -5,16 +5,21 @@ WIDTH = 490 HEIGHT = 490 d = 2 +g = 1 def update(): global d - if oiseau.x >= 470 and d > 0: - d = -d - if oiseau.x <= 20 and d < 0: - d = -d - oiseau.x += d + if oiseau.y < 470: + oiseau.x += d + if oiseau.y < 470: + oiseau.y += d + if oiseau.y >= 470: + print("Game Over") +def on_mouse_down(): + print ('') + def draw(): screen.blit("back", (0, 0)) oiseau.draw()