Untitled
unknown
python
2 years ago
705 B
7
Indexable
import pygame
pygame.init()
screen = pygame.display.set_mode([500, 500])
running = True
while running:
# Did the user click the window close button?
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
#
# # Fill the background with white
screen.fill((125, 153, 136))
#
# # Draw a solid blue circle in the center
pygame.draw.circle(screen, (0, 0, 255), (250, 250), 75)
pygame.draw.rect(screen, (0, 0, 255),(10,10,100,100))
pygame.draw.polygon(screen, (0, 0, 255),((10,120),(110,120),(60,200)))
#
# # Flip the display
pygame.display.flip()
# Done! Time to quit.
pygame.quit()
Editor is loading...