Ejemplo n.º 1
0
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()
Ejemplo n.º 2
0
	def __init__ (self, run = False):
		"""	Initialise the game """
		self.ui = UserInterface()

		# Run the game once initialisation is complete
		if run: self.run()