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

30 lines
1.1 KiB
Python
Raw Permalink Normal View History

2023-04-24 00:00:49 +02:00
from classes.GameBoard import GameBoard
2024-04-03 12:42:19 +02:00
from my_helpers.Config import Config
2023-04-24 00:00:49 +02:00
2023-04-25 18:57:37 +02:00
import logging
import lzma, os
2023-04-24 00:00:49 +02:00
if __name__ == '__main__':
2024-04-03 12:42:19 +02:00
CONFIG = Config("config.json")
DEBUG = False
2023-04-24 00:00:49 +02:00
2023-04-25 18:57:37 +02:00
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"]})
2023-04-24 00:00:49 +02:00
game_board = GameBoard(CONFIG, SAVE_STATE_FILE, MAP_FILE)
game_board.find_game_state(store_state=not DEBUG)
2023-04-25 18:57:37 +02:00
game_board.user_input()
2023-04-24 00:00:49 +02:00
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())