-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlesson.py
51 lines (35 loc) · 1.12 KB
/
lesson.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import pygame
from pygame.draw import *
pygame.init()
SCREEN = (400, 400)
SCREEN_COLOR = "white"
SCREEN1 = SCREEN[0]
SCREEN2 = SCREEN[1]
FPS = 30
screen = pygame.display.set_mode(SCREEN)
N = 10
color = (255, 255, 255)
rect(screen, SCREEN_COLOR, [0,0,SCREEN1,SCREEN2])
class my_face:
class skin:
circle(screen,color="yellow", radius=150, center=[200,200])
class eyes:
circle(screen,color="red", radius=30, center=[140,150])
circle(screen,color="black", radius=15, center=[140,150])
circle(screen,color="red", radius=25, center=[260,150])
circle(screen,color="black", radius=10, center=[260,150])
class brows:
line(screen, "black", [90, 60], [190, 140], 10)
line(screen, "black", [200, 140], [300, 90], 10)
class mouth:
ellipse(screen, "black", [110, 200, 180, 120])
ellipse(screen, "yellow", [110, 220, 180, 120])
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()