import json class ConstantsParser: def __init__(self, file: str): parsed = json.load(open(file)) self.level_size = (parsed['level']['level_size'][0], parsed['level']['level_size'][1]) self.block_size = (parsed['level']['block_size'][0], parsed['level']['block_size'][1]) CONFIG = ConstantsParser("data/config/config.json")