38 lines
1.1 KiB
Python
38 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 = {
|
|
"path": f"{CONFIG['save_file']['path']}/{CONFIG['save_file']['filename']}",
|
|
"compression": lzma,
|
|
"key": CONFIG["save_file"]["encryption_key"]
|
|
}
|
|
MAP_FILE = {
|
|
"path": f"{CONFIG['map_file']['path']}/{CONFIG['map_file']['filename']}",
|
|
"compression": lzma,
|
|
"key": CONFIG["map_file"]["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())
|