AIprojekt-wozek/Program.py
2022-05-20 01:13:40 +02:00

22 lines
699 B
Python

import pygame
from pygame.locals import *
from Environment import Environment
from Global_variables import Global_variables as G_var
class Program:
def __init__(self):
pygame.init()
self.window = pygame.display.set_mode(
(G_var().WINDOW_X, G_var().WINDOW_Y)) # decides window's size
self.environment = Environment(self.window)
def run(self):
running = True
while running:
for event in pygame.event.get(): # integrating with keyboard
if event.type == QUIT:
running = False
self.environment.update_all_elements()
self.environment.draw_all_elements()