-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstants.py
46 lines (37 loc) · 1.02 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
import pygame, shelve
from enum import Enum
pygame.init()
# buttons for crash.py
class crashButton(Enum):
restart = 0
home = 1
# display values
dispWD = 800
dispHT = 700
# basic colors
white = (255, 255, 255)
red = (175, 0, 0)
green = (124, 252, 0)
blue = (65, 105, 225)
# rect colors
black = (0, 0, 0)
grey = (150, 150, 150)
DKblue = (0, 0, 255)
purple = (75, 0, 130)
DKred = (139, 0, 0)
DKgreen = (34, 139, 34)
rectColors = [black, grey, DKblue, purple, DKred, DKgreen]
# fonts
lobsterS = pygame.font.Font(r'Fonts\Lobster-Regular.ttf', 40)
lobsterL = pygame.font.Font(r'Fonts\Lobster-Regular.ttf', 80)
nosifer = pygame.font.Font(r'Fonts\NosiferCaps-Regular.ttf', 80)
oswald = pygame.font.Font(r'Fonts\Oswald-Regular.ttf', 40)
# display/clock settings
display = pygame.display.set_mode((dispWD, dispHT))
pygame.display.set_caption('Racecar Dodge')
clock = pygame.time.Clock()
# car image settings
car = pygame.image.load(r'Images\racecar.png')
carWD, carHT = car.get_size()
# user data from shelve
shelf = shelve.open('data')