class Darkness (): def __init__ (self, run = False): """ Initialise the game """ self.ui = UserInterface() # Run the game once initialisation is complete if run: self.run() def run (self): """ Run the event loop """ while 1: for event in pygame.event.get(): if event.type == pygame.QUIT: return self.ui.draw()
def __init__ (self, run = False): """ Initialise the game """ self.ui = UserInterface() # Run the game once initialisation is complete if run: self.run()