From e339a2ced42fc801ae2da2e8d61af99d3790f1f4 Mon Sep 17 00:00:00 2001 From: ennucore Date: Mon, 27 Sep 2021 09:35:45 +0300 Subject: [PATCH] Lab3 - task 1 --- lab3/task_1.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lab3/task_1.py diff --git a/lab3/task_1.py b/lab3/task_1.py new file mode 100644 index 0000000..f132248 --- /dev/null +++ b/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() +