add imports, display size and game clock

Signed-off-by: Better nya <nya@nya.com>
This commit is contained in:
Better nya 2026-02-16 11:44:10 +11:00
parent 3c34651f41
commit 5917fd7501

20
main.py
View file

@ -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()