refactor: move config load into main function
This commit is contained in:
4
main.py
4
main.py
@@ -3,9 +3,6 @@ import pygame
|
|||||||
from entity.Piece import Piece
|
from entity.Piece import Piece
|
||||||
from util.ConfigurationManager import ConfigurationManager
|
from util.ConfigurationManager import ConfigurationManager
|
||||||
|
|
||||||
# load configs into game
|
|
||||||
ConfigurationManager.load()
|
|
||||||
|
|
||||||
# potential color palette https://coolors.co/6495ed-ee6352-59cd90-fac05e-f79d84
|
# potential color palette https://coolors.co/6495ed-ee6352-59cd90-fac05e-f79d84
|
||||||
FIRE_OPAL = (238, 99, 82) # TODO define colors in config
|
FIRE_OPAL = (238, 99, 82) # TODO define colors in config
|
||||||
TILE_SIZE = 20 # TODO define tile size in config
|
TILE_SIZE = 20 # TODO define tile size in config
|
||||||
@@ -35,6 +32,7 @@ def draw(screen):
|
|||||||
pygame.display.update()
|
pygame.display.update()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
ConfigurationManager.load()
|
||||||
pygame.init()
|
pygame.init()
|
||||||
|
|
||||||
win_width = ConfigurationManager.configuration["window"]["width"]
|
win_width = ConfigurationManager.configuration["window"]["width"]
|
||||||
|
|||||||
Reference in New Issue
Block a user