Browse Source

Lab3 - task 1

master
Lev 3 years ago
parent
commit
e339a2ced4
  1. 33
      lab3/task_1.py

33
lab3/task_1.py

@ -0,0 +1,33 @@
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()
Loading…
Cancel
Save