mirror of
https://github.com/13hannes11/outyard-hackathon-rush-hour-co2.git
synced 2024-09-03 20:10:59 +02:00
add game over text
Co-authored-by: Laura Januleviciute <januleviciute.laura@gmail.com>
This commit is contained in:
6
main.py
6
main.py
@@ -7,9 +7,14 @@ from Car import Car
|
|||||||
from Vacuum import Vacuum
|
from Vacuum import Vacuum
|
||||||
|
|
||||||
pygame.init()
|
pygame.init()
|
||||||
|
pygame.font.init()
|
||||||
|
|
||||||
SCREEN_WIDTH = 800
|
SCREEN_WIDTH = 800
|
||||||
SCREEN_HEIGHT = 600
|
SCREEN_HEIGHT = 600
|
||||||
|
|
||||||
|
FONT = pygame.font.SysFont('Comic Sans MS', 128)
|
||||||
|
TEXT_SCREEN = FONT.render('Game over!', False, (255, 255, 255))
|
||||||
|
TEXT_RECT = TEXT_SCREEN.get_rect(center=(SCREEN_WIDTH/2, SCREEN_HEIGHT/2))
|
||||||
|
|
||||||
BUBBLE_LIMIT = 100
|
BUBBLE_LIMIT = 100
|
||||||
|
|
||||||
@@ -40,6 +45,7 @@ while True:
|
|||||||
game_object.draw(SCREEN)
|
game_object.draw(SCREEN)
|
||||||
else:
|
else:
|
||||||
# TODO game over screen with message to reduce driving cars
|
# TODO game over screen with message to reduce driving cars
|
||||||
|
SCREEN.blit(TEXT_SCREEN, TEXT_RECT)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user