mirror of
https://github.com/13hannes11/outyard-hackathon-rush-hour-co2.git
synced 2024-09-03 20:10:59 +02:00
add gameover screen and change colors
Co-authored-by: Laura Januleviciute <januleviciute.laura@gmail.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import pygame
|
|||||||
import random
|
import random
|
||||||
|
|
||||||
class Bubble:
|
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.posX = posX
|
||||||
self.posY = posY
|
self.posY = posY
|
||||||
self.radius = radius
|
self.radius = radius
|
||||||
|
|||||||
2
Car.py
2
Car.py
@@ -3,7 +3,7 @@ import random
|
|||||||
from Bubble import Bubble
|
from Bubble import Bubble
|
||||||
|
|
||||||
class Car:
|
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.posX = posX
|
||||||
self.posY = posY
|
self.posY = posY
|
||||||
self.color = color
|
self.color = color
|
||||||
|
|||||||
9
main.py
9
main.py
@@ -7,11 +7,14 @@ from Car import Car
|
|||||||
from Vacuum import Vacuum
|
from Vacuum import Vacuum
|
||||||
|
|
||||||
pygame.init()
|
pygame.init()
|
||||||
|
SCREEN_WIDTH = 800
|
||||||
|
SCREEN_HEIGHT = 600
|
||||||
|
|
||||||
BUBBLE_LIMIT = 1000
|
|
||||||
|
|
||||||
SCREEN = pygame.display.set_mode((800,600))
|
BUBBLE_LIMIT = 100
|
||||||
BACKGROUND = (255,255,255)
|
|
||||||
|
SCREEN = pygame.display.set_mode((SCREEN_WIDTH,SCREEN_HEIGHT))
|
||||||
|
BACKGROUND = (0,0,0)
|
||||||
SCREEN.fill(BACKGROUND)
|
SCREEN.fill(BACKGROUND)
|
||||||
CLOCK = pygame.time.Clock()
|
CLOCK = pygame.time.Clock()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user