-
Notifications
You must be signed in to change notification settings - Fork 26
/
constants.py
73 lines (62 loc) · 1.55 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
BOARDHEIGHT = 7
BOARDWIDTH = 7
TILESIZE = 92
WINDOWWIDTH = 900
WINDOWHEIGHT = 720
FENCEHEIGHT = 5
FENCEWIDTH = 2 * (TILESIZE - 2)
FPS = 20
ANIMATIONSPEED = 6
BLANK = None
# set of colors
# R G B
GRAY = (100, 100, 100)
NAVYBLUE = (60, 60, 100)
WHITE = (255, 255, 255)
DARKGREEN = (0, 155, 0)
RED = (255, 0, 0)
GREEN = (0, 190, 0)
BLUE = (0, 0, 235)
YELLOW = (255, 255, 0)
ORANGE = (255, 128, 0)
PURPLE = (255, 0, 255)
CYAN = (0, 255, 255)
DARKTURQUIOSE = (3, 54, 73)
BRIGHTBLUE = (0, 50, 255)
DARKGRAY = (40, 40, 40)
BLACK = (0, 0, 0)
BGCOLOR = DARKTURQUIOSE
TILECOLOR = GREEN
TEXTCOLOR = WHITE
BOARDCOLOR = NAVYBLUE
BASICFONTSIZE = 30
BORDERCOLOR = BLACK
HIGHLIGHTCOLOR = BLUE
LIGHTBGCOLOR = BRIGHTBLUE
BUTTONTEXTCOLOR = BLACK
BUTTONCOLOR = WHITE
MESSAGECOLOR = WHITE
XMARGIN = int((WINDOWWIDTH - (TILESIZE * BOARDWIDTH + (BOARDWIDTH - 1))) / 2)
YMARGIN = int((WINDOWHEIGHT - (TILESIZE * BOARDHEIGHT - (BOARDHEIGHT - 1))) / 2)
UP = "up"
DOWN = "down"
LEFT = "left"
RIGHT = "right"
JUPUP = "jumpupup"
JUPLEFT = "jumpupleft"
JUPRIGHT = "jumpupright"
JDOWNDOWN = "jumpdowndown"
JDOWNLEFT = "jumpdownleft"
JDOWNRIGHT = "jumpdownright"
JLEFTLEFT = "jumpleftleft"
JLEFTUP = "jumpleftup"
JLEFTDOWN = "jumpleftdown"
JRIGHTRIGHT = "jumprightright"
JRIGHTUP = "jumprightup"
JRIGHTDOWN = "jumprightdown"
carImg = pygame.image.load("car_11.png")
carImg1 = pygame.image.load("car_22.png")
flagImg = pygame.image.load("blue2.jpg")
flagImg1 = pygame.image.load("red2.jpg")
hmImg1 = pygame.image.load("hm2.jpg")
FENCELIMIT = 8 # The maximum numbr of fences a player can use