Closed OmerKSonmez closed 8 months ago
colors = [RED, BLUE, WHITE] bricks = [] for row in range(5): for col in range(WIDTH // BRICK_WIDTH): brick_color = random.choice(colors) brick = pygame.Rect(col BRICK_WIDTH, row BRICK_HEIGHT, BRICK_WIDTH, BRICK_HEIGHT) bricks.append((brick, brick_color))
See brickBreakerGame.py main branch
Each new game attempt spawns in different, randomly generated, set of bricks with different colors.