Exemplo n.º 1
0
	def generateRandom(self):
		for i in range(5):
			size_x = random.randint(10, 20)
			size_y = random.randint(5, 10)
			x = random.randint(10, self.size_x - size_x - 10)
			y = random.randint(10, self.size_y - size_y - 10)
			room = Room(x, y, size_x, size_y)
			if not room.isInList(self.room, 4):
				self.room.append(room)