From e10d862180aee789a8ee2410944222aab788c46a Mon Sep 17 00:00:00 2001 From: "Hannes F. Kuchelmeister" Date: Fri, 5 Nov 2021 20:23:51 +0100 Subject: [PATCH] add gameover screen and change colors Co-authored-by: Laura Januleviciute --- Bubble.py | 2 +- Car.py | 2 +- main.py | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Bubble.py b/Bubble.py index 5800c43..ab69995 100644 --- a/Bubble.py +++ b/Bubble.py @@ -2,7 +2,7 @@ import pygame import random class Bubble: - def __init__(self, posX, posY, radius = 1, color=(0,0,0), direction=(1,1)): + def __init__(self, posX, posY, radius = 1, color=(0,0,255), direction=(1,1)): self.posX = posX self.posY = posY self.radius = radius diff --git a/Car.py b/Car.py index 25277f7..5a63be9 100644 --- a/Car.py +++ b/Car.py @@ -3,7 +3,7 @@ import random from Bubble import Bubble class Car: - def __init__(self, posX, posY, height, width, game_objects, color=(0,0,0), directionX=1): + def __init__(self, posX, posY, height, width, game_objects, color=(0, 255,0), directionX=1): self.posX = posX self.posY = posY self.color = color diff --git a/main.py b/main.py index db8778c..9e97f58 100644 --- a/main.py +++ b/main.py @@ -7,11 +7,14 @@ from Car import Car from Vacuum import Vacuum pygame.init() +SCREEN_WIDTH = 800 +SCREEN_HEIGHT = 600 -BUBBLE_LIMIT = 1000 -SCREEN = pygame.display.set_mode((800,600)) -BACKGROUND = (255,255,255) +BUBBLE_LIMIT = 100 + +SCREEN = pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT)) +BACKGROUND = (0,0,0) SCREEN.fill(BACKGROUND) CLOCK = pygame.time.Clock()