import pygame
import random
WIDTH = 500
HEIGHT = 500
FPS = 60
WHITE = (255, 255, 255)
BlACK = (0, 0, 0)
pygame.init()
screen = pygame.display.set_mode((WIDTH, HEIGHT))
counter = 1
clock = pygame.time.Clock()
running = True
while running:
clock.tick(60)
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill(WHITE)
for it_1 in range(0,500,50):
pygame.draw.line(screen, BlACK, [0, it_1], [500, it_1],counter)
pygame.draw.line(screen, BlACK, [it_1, 0], [it_1,500],counter)
pygame.display.update()
if counter > 50:counter = 1
counter = counter + 1
pygame.quit()
|