diff --git a/images/dead.png b/images/dead.png index b829dff..8f93e0c 100644 Binary files a/images/dead.png and b/images/dead.png differ diff --git a/images/dead8.png b/images/dead8.png deleted file mode 100644 index 03d233a..0000000 Binary files a/images/dead8.png and /dev/null differ diff --git a/main.py b/main.py index 1c78456..80acc46 100644 --- a/main.py +++ b/main.py @@ -6,10 +6,10 @@ WIDTH = 800 HEIGHT = 600 APPLE_POS = (WIDTH / 2, HEIGHT / 2) -DINO_SPEED = 80 +DINO_SPEED = 120 START_SPAWN_INTERVAL = 2.0 MIN_SPAWN_INTERVAL = 0.2 -SPAWN_ACCELERATION = 0.005 +SPAWN_ACCELERATION = 0.3 CORPSE_LIFETIME = 2.0 APPLE_HIT_RADIUS = 25 @@ -32,7 +32,9 @@ def on_mouse_move(pos, rel, buttons): def spawn_dinosaurs(): """Create a dinosaur just outside one edge of the screen.""" - dino = Actor("dino") + dino_images = ("dino", "dino2") + random_dino = random.choice(dino_images) + dino = Actor(random_dino) side = random.randint(0, 3) if side == 0: # up @@ -49,6 +51,7 @@ def spawn_dinosaurs(): dino.y = random.randint(0, HEIGHT) dinosaurs.append(dino) + def update(dt): global spawn_timer, spawn_interval, game_time, score, missed_apples game_time += dt @@ -86,6 +89,7 @@ def update(dt): if game_time - corpse["die_time"] >= CORPSE_LIFETIME: corpses.remove(corpse) + def draw(): screen.fill((100, 200, 100)) apple.draw()