changed initialisation ordering
This commit is contained in:
parent
6412bbd26f
commit
16c32133cb
@ -22,19 +22,6 @@ from pygame.locals import *
|
|||||||
pygame_fps = 30 #frames per second setting
|
pygame_fps = 30 #frames per second setting
|
||||||
pygame_clock = pygame.time.Clock()
|
pygame_clock = pygame.time.Clock()
|
||||||
|
|
||||||
# colors
|
|
||||||
pygame_color_green = pygame.Color(42, 217, 13)
|
|
||||||
pygame_color_black = pygame.Color(0, 0, 0)
|
|
||||||
pygame_color_white = pygame.Color(255, 255, 255)
|
|
||||||
pygame_color_yellow = pygame.Color(255, 215, 0)
|
|
||||||
pygame_color_grey = pygame.Color(196, 202, 206)
|
|
||||||
pygame_color_brown = pygame.Color(177, 86, 15)
|
|
||||||
|
|
||||||
# fonts
|
|
||||||
pygame_font_1 = pygame.font.Font('freesansbold.ttf', 90)
|
|
||||||
pygame_font_2 = pygame.font.Font('freesansbold.ttf', 65)
|
|
||||||
pygame_font_3 = pygame.font.Font('freesansbold.ttf', 45)
|
|
||||||
|
|
||||||
# font colors
|
# font colors
|
||||||
pygame_font_main_color = pygame_color_black
|
pygame_font_main_color = pygame_color_black
|
||||||
|
|
||||||
@ -80,6 +67,19 @@ hs3_time = 300
|
|||||||
# initialise the game
|
# initialise the game
|
||||||
pygame.init()
|
pygame.init()
|
||||||
|
|
||||||
|
# fonts
|
||||||
|
pygame_font_1 = pygame.font.Font('freesansbold.ttf', 90)
|
||||||
|
pygame_font_2 = pygame.font.Font('freesansbold.ttf', 65)
|
||||||
|
pygame_font_3 = pygame.font.Font('freesansbold.ttf', 45)
|
||||||
|
|
||||||
|
# colors
|
||||||
|
pygame_color_green = pygame.Color(42, 217, 13)
|
||||||
|
pygame_color_black = pygame.Color(0, 0, 0)
|
||||||
|
pygame_color_white = pygame.Color(255, 255, 255)
|
||||||
|
pygame_color_yellow = pygame.Color(255, 215, 0)
|
||||||
|
pygame_color_grey = pygame.Color(196, 202, 206)
|
||||||
|
pygame_color_brown = pygame.Color(177, 86, 15)
|
||||||
|
|
||||||
# initialise gpio
|
# initialise gpio
|
||||||
GPIO.setmode(GPIO.BOARD)
|
GPIO.setmode(GPIO.BOARD)
|
||||||
GPIO.setup(pin_start, GPIO.IN)
|
GPIO.setup(pin_start, GPIO.IN)
|
||||||
|
Loading…
Reference in New Issue
Block a user