-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
59 lines (51 loc) · 1.03 KB
/
constants.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
52
53
54
55
56
57
58
59
# Colors
WHITE = (255, 255, 255)
SHADOW = (0, 0, 0, 40)
LIGHT_GRAY = (200, 200, 200)
GRAY = (150, 150, 150)
DARK_GRAY = (100, 100, 100)
LIGHT_BLUE = (150, 190, 240)
BLUE = (140, 175, 230)
DARK_BLUE = (85, 125, 175)
GREEN = (147, 216, 175)
ORANGE = (255, 190, 90)
BROWN = (175, 122, 56)
RED = (255, 133, 109)
YELLOW = (252, 255, 132)
# Screen Size
WIDTH = 1280
HEIGHT = 720
CENTER_X = WIDTH / 2
CENTER_Y = HEIGHT / 2
CENTER = (CENTER_X, CENTER_Y)
# Paddles
PADDLE_X = 90
PADDLE_WIDTH = 10
PADDLE_HEIGHT = 100
PADDLE_SPEED = 3
PADDLE_ACCEL = 0.05
PADDLE_DECEL = 0.2
PADDLE_MIN = 0
PADDLE_MAX = HEIGHT
# Ball
BALL_SIZE = (20, 20)
BALL_X_START = PADDLE_X + 20
BALL_Z_START = 150
BALL_X_SPEED = 5 # 5
BALL_Z_START_SPEED = 3.691
BALL_Z_SPEED = 5.35 # 5.425
BALL_Z_ACCEL = -0.05 # -0.05
# Table and Net
TABLE_LENGTH = 950
TABLE_WIDTH = 450 #520
TABLE_HEIGHT = 20
TABLE_SHADOW_WIDTH = 125
NET_LENGTH = 10
NET_HEIGHT = 50
LEG_HEIGHT = 100
# Scoreboard
SCOREBOARD_HEIGHT = 50
SCOREBOARD_WIDTH = 150
SCOREBOARD_BORDER = 4
# Button
BUTTON_SIZE = (320, 100)