"""__author__ = ErYang"""
import pygame
import random
from math import pi
def rand_color():
"""随机颜色"""
return random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)
pygame.init()
screen = pygame.display.set_mode((600, 400))
screen.fill((125, 125, 125))
pygame.draw.circle(screen, (0, 180, 220), (300, 200), 150, 5)
p = 150*(2**0.5/2)
pygame.draw.arc(screen, (20, 20, 20), (300 - p, 200 - p, 175, 200), 4*pi/3, 11*pi/6, 10)
list_point = [(300, 200), (300 + p, 200 + p), (300 + p, 200 - p), (300, 200), (300 - p, 200 + p), (300 - p, 200 - p), (300, 200)]
pygame.draw.lines(screen, (255, 125, 125), True, list_point, 5)
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit()
if __name__ == '__main__':
pass
网友评论