Лабораторные работы по Python, ЛФИ, 1 семестр
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
939 B

import pygame
from pygame.draw import *
pygame.init()
FPS = 30
screen = pygame.display.set_mode((400, 400))
screen.fill((255, 255, 255))
W = 1
circle(screen, (255, 255, 0), (200, 200), 100, 0)
circle(screen, (0, 0, 0), (200, 200), 100, W)
rect(screen, (0, 0, 0), [(150, 250), (100, 20)])
circle(screen, (255, 0, 0), (150, 180), 20, 0)
circle(screen, (0, 0, 0), (150, 180), 20, W)
circle(screen, (255, 0, 0), (250, 180), 15, 0)
circle(screen, (0, 0, 0), (250, 180), 15, W)
polygon(screen, (0, 0, 0), [(103, 116), (98, 124), (177, 174), (182, 166)])
polygon(screen, (0, 0, 0), [(219, 166), (222, 174), (302, 144), (298, 136)])
circle(screen, (0, 0, 0), (150, 180), 8)
circle(screen, (0, 0, 0), (250, 180), 7)
pygame.display.update()
clock = pygame.time.Clock()
finished = False
while not finished:
clock.tick(FPS)
for event in pygame.event.get():
if event.type == pygame.QUIT:
finished = True
pygame.quit()