📅  最后修改于: 2022-03-11 14:55:22.688000             🧑  作者: Mango
while True:
for events in pygame.event.get():
if events.type == pygame.QUIT:
pygame.quit()
sys.exit()
#Here for any commands inside the for loop
if (events.type == pygame.KEYDOWN) and (events.key == pygame.K_SPACE):
COLOR = (random.randint(ZEROINTENSITY, MAXINTENSITY), random.randint(ZEROINTENSITY, MAXINTENSITY), random.randint(ZEROINTENSITY, MAXINTENSITY))
#note- we have skipped the last parameter and by default, 0 is taken
pygame.draw.circle(SCREEN, COLOR, POS, RADIUS)
pygame.display.update()