You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Match Three Game")
Create the board
board = [[random.choice(COLORS) for _ in range(BOARD_SIZE)] for _ in range(BOARD_SIZE)]
def draw_board():
for y in range(BOARD_SIZE):
for x in range(BOARD_SIZE):
pygame.draw.rect(screen, board[y][x], (x * TILE_SIZE, y * TILE_SIZE, TILE_SIZE, TILE_SIZE))
pygame.draw.rect(screen, (0, 0, 0), (x * TILE_SIZE, y * TILE_SIZE, TILE_SIZE, TILE_SIZE), 2)
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
Activity