Создал фон и облака ко 2 заданию
This commit is contained in:
32
task2.py
Normal file
32
task2.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import pygame
|
||||||
|
from pygame.draw import *
|
||||||
|
|
||||||
|
pygame.init()
|
||||||
|
|
||||||
|
FPS = 30
|
||||||
|
screen = pygame.display.set_mode((1000, 1000))
|
||||||
|
a = 30
|
||||||
|
dx = 80
|
||||||
|
y = 450
|
||||||
|
|
||||||
|
rect(screen, (100, 100, 100), (0, 0, 1000, 450))
|
||||||
|
rect(screen, (20, 20, 20), (0, 450, 1000, 1000))
|
||||||
|
|
||||||
|
|
||||||
|
circle(screen, (200, 200, 200), (875, 100), 75)
|
||||||
|
ellipse(screen, (40, 40, 40), (40, 100, 800, 75))
|
||||||
|
ellipse(screen, (60, 60, 60), (450, 60, 570, 75))
|
||||||
|
ellipse(screen, (50, 50, 50), (600, 160, 570, 60))
|
||||||
|
|
||||||
|
|
||||||
|
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()
|
||||||
Reference in New Issue
Block a user