pygame如意金箍棒画笔练习程序.py

"""pygame如意金箍棒画笔练习程序.py"""

__author__ = "李兴球"
__date__ = "2018年7月"

import pygame
from pygame.locals import *

pygame.init()
screen = pygame.display.set_mode((480,360))
pygame.display.set_caption("pygame如意金箍棒,作者:李兴球")

for y in range(50):
    pygame.draw.circle(screen,(255,255,0),(230,50+y),10)
    pygame.display.update()    

for y in range(50,200):
    pygame.draw.circle(screen,(255,0,0),(230,50+y),10)
    pygame.display.update()

for y in range(200,250):
    pygame.draw.circle(screen,(255,255,0),(230,50+y),10)
    pygame.display.update()

while True:
    event=pygame.event.wait()
    print(event.type)
    if event.type in (QUIT,MOUSEBUTTONDOWN,KEYDOWN):
        break
pygame.quit()