import sys from src.graphics import * from src.matrix import Matrix from src.waiter import Waiter if __name__ == "__main__": # SETUP pygame.init() clock = pygame.time.Clock() fps = 40 waiter = Waiter() graphics = Graphics() # init functions graphics.drawBackground(waiter.matrix) graphics.update(waiter.X, waiter.Y) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() break if event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: pygame.quit() sys.exit() break graphics.clear(waiter.X, waiter.Y) waiter.update(event) graphics.update(waiter.X, waiter.Y) pygame.display.flip() clock.tick(fps)