def setup(): global universe universe = Universe()
import pygame import sys from core.universe import Universe pygame.init() window_name = '.'.join(sys.argv[0].split('.')[:-1]) pygame.display.set_caption(window_name if window_name != '' else 'pygame') SCREEN = pygame.display.set_mode((1000, 400)) done = False clock = pygame.time.Clock() FRAME_RATE = 60 universe = Universe() def setup(): global universe universe = Universe() def draw(): SCREEN.fill((245, 245, 245)) if (universe.show(SCREEN)): universe.update() #----------------------------------------------------------------------- while not done: draw() for event in pygame.event.get():