All pastes #730480 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-09 07:55 UTC
rendered paste body
	def initLevel(self, level):
		greenBrick = pygame.image.load('gfx/greenbrick.png')
		blueBrick = pygame.image.load('gfx/bluebrick.png')
		redBrick = pygame.image.load('gfx/redbrick.png')
		yellowBrick = pygame.image.load('gfx/yellowbrick.png')
		
		self.themBricks = [Brick(redBrick), Brick(greenBrick), Brick(blueBrick), Brick(yellowBrick)]
		
		self.currentLevel = self.levels[level]
		
		i = 0
		e = 0
		self.bricks = []
		for row in self.currentLevel:
			for col in self.currentLevel[i]:
				if col != 0:
					#self.copyBrick(col, self.coordList[i][e][0], self.coordList[i][e][1])
					currentBrick = self.copyBrick(col)
					currentBrick.setCoords(self.coordList[i][e][0], self.coordList[i][e][1])
					self.bricks.append(currentBrick)
				e = e + 1
			e = 0
			i = i + 1
			
	def copyBrick(self, int, x, y):
		return copy.copy(self.themBricks[int-1])