This repository has been archived on 2026-06-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
The-Adventure-Game/run.py
T

30 lines
1.1 KiB
Python

from classes.GameBoard import GameBoard
from my_helpers.Config import Config
import logging
import lzma, os
if __name__ == '__main__':
CONFIG = Config("config.json")
DEBUG = False
if CONFIG["logging"]["enabled"]:
os.makedirs(CONFIG['logging']['file']['path'], exist_ok=True)
logging.basicConfig(filename=f"{CONFIG['logging']['file']['path']}/{CONFIG['logging']['file']['name']}", encoding='utf-8', level=logging.DEBUG)
LOGGING = logging.getLogger(__name__)
SAVE_STATE_FILE = CONFIG.get_file_path("file/save", add_to_dictionary={"compression": lzma, "key": CONFIG['file']["save"]["encryption_key"]})
MAP_FILE = CONFIG.get_file_path("file/map", add_to_dictionary={"compression": lzma, "key": CONFIG['file']["map"]["encryption_key"]})
game_board = GameBoard(CONFIG, SAVE_STATE_FILE, MAP_FILE)
game_board.find_game_state(store_state=not DEBUG)
game_board.user_input()
print(game_board.get_game_state())
if not DEBUG:
game_board.save_game_state()
print()
print(game_board.get_player_species())
print(game_board.get_player_combineble_species())