New bricks, with new colors, and more simmetric levels (always random).
I load a new random brick for every line, so that the color for the line is the same.
for line in blist: b = pygame.image.load(choice(glob("img/bricks3/*.png"))) # randomcolor = randrange(100, 255), randrange(100, 255), randrange(100, 255) randomcolor = choice(COLORS) for brick in line: if brick == "1": # This are the rect coordinates bricks.append(Brick(b, 40 + w * 21, h, w=20, h=20, color=randomcolor))
Subscribe to the newsletter for updates
Tkinter templates
My youtube channel
Twitter: @pythonprogrammi - python_pygame