forked from Galtzor/elaeps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
37 lines (29 loc) · 960 Bytes
/
Main.py
File metadata and controls
37 lines (29 loc) · 960 Bytes
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
import sys, pygame, Logic, Renderer
pygame.init()
# CONSTANTS #
# --------- #
screenSize = width, height = 1400, 900
center = center_w, center_h = width/2, height/2
backgroundColor = 50, 20, 30
textColor = 0, 0, 0
distance = 86
lineColor = 200, 255, 255
timePos = 16, 16
#timeFont = pygame.font.Font(None, 64)
dateFont = pygame.font.Font(None, 32)
datePos = (26, 156)
square = pygame.image.load("square.png")
#screen = pygame.display.set_mode(screenSize)
squareSize = square.get_rect().w
#12:00
squarePos = center_w - squareSize / 2, center_h - distance - squareSize / 2
lineEnd = center_w, squarePos[1] + squareSize / 2
pm = True
# INITIALIZE CLASSES ETC. #
# ----------------------- #
renderer = Renderer.Renderer(screenSize, backgroundColor, lineColor, center, square, timePos, datePos, dateFont, textColor)
logic = Logic.Logic(center, distance, squarePos, lineEnd, pm, squareSize, renderer)
# GAME LOOP #
# --------- #
while 1:
logic.update()