import pygame
import random
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("")
circleX = 0
circleY = 0
click = 0
r = 20
run = True
while run:
pygame.time.delay(100)
win.fill((0,0,0))
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.MOUSEBUTTONDOWN:
if event.button == 1:
circleX = event.pos[0]
circleY = event.pos[1]
click = 1
if click == 1:
pygame.draw.circle(win, (255,255,255), (circleX,circleY), r)
r = r + 1
pygame.display.update()
pygame.quit()
|