From 82b9e6d2558ecd4bb0591b919b9af7c23b7bd3d3 Mon Sep 17 00:00:00 2001 From: "Hannes F. Kuchelmeister" Date: Fri, 5 Nov 2021 21:53:34 +0100 Subject: [PATCH] vary speed of cars when respawning Co-authored-by: Laura Januleviciute --- Car.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Car.py b/Car.py index fefcd80..2ee2785 100644 --- a/Car.py +++ b/Car.py @@ -29,9 +29,11 @@ class Car: if self.directionX > 0: if self.posX > screen_width: self.posX = -self.width + self.directionX = random.uniform(1, 5) else: if self.posX + self.width < 0: self.posX = screen_width + self.width + self.directionX = -random.uniform(1, 5) if self.bubble_spawn_time_ms + self.time_of_last_spawn < pygame.time.get_ticks():