init commit, working save game
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from classes.GameBoard import GameBoard
|
||||
|
||||
from json import load as json_load
|
||||
import lzma
|
||||
|
||||
if __name__ == '__main__':
|
||||
with open("config.json", "r") as f:
|
||||
CONFIG = json_load(f)
|
||||
|
||||
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)
|
||||
saved_state = game_board.find_save_state()
|
||||
|
||||
print("Story Pos:", game_board.get_world())
|
||||
print(game_board.map)
|
||||
print(saved_state.get_player())
|
||||
Reference in New Issue
Block a user