import pygame
import random
import math
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("")
var_1 = 0
var_2 = 0
y1 = 10
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_RETURN:
pygame.image.save(win, "image.jpg")
for i in range(0,500,100):
pygame.draw.line(win, (255,255,255), [var_1+i, y1], [i+var_2, y1], 3)
var_1 = var_1+1
var_2=var_2-1
y1 = y1 + 10
pygame.display.update()
pygame.quit()
|