add imports, display size and game clock
Signed-off-by: Better nya <nya@nya.com>
This commit is contained in:
parent
3c34651f41
commit
5917fd7501
1 changed files with 20 additions and 0 deletions
20
main.py
20
main.py
|
|
@ -1,2 +1,22 @@
|
||||||
|
import sys
|
||||||
|
import pygame
|
||||||
|
pygame.init()
|
||||||
|
#SETUP
|
||||||
|
WIDTH, HEIGHT = 800, 800
|
||||||
|
WINDOW = pygame.display.set_mode((WIDTH, HEIGHT))
|
||||||
|
pygame.display.set_caption("Traffic Controller")
|
||||||
|
|
||||||
|
#CONSTANTS
|
||||||
|
FPS = 60
|
||||||
|
|
||||||
|
# Game loop
|
||||||
|
clock = pygame.time.Clock()
|
||||||
|
running = True
|
||||||
|
while running:
|
||||||
|
clock.tick(FPS)
|
||||||
|
for event in pygame.event.get():
|
||||||
|
if event.type == pygame.QUIT:
|
||||||
|
running = False
|
||||||
|
pygame.quit()
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue