Skip to content

Conversation

@LadyLiu
Copy link
Collaborator

@LadyLiu LadyLiu commented Mar 3, 2022

Included save view.

from app.model.db.save_manager import SaveManager

def save_game(self):
    """
    Saves the game to the database.
    :return: True if saved, False if an error occurred.
    """
    dungeon, adventurer, map = self.__model["dungeon"], self.__model["hero"], self.__model["map"]
    dungeon, adventurer, map = dungeon.json_dict, adventurer.char_dict, map.map_dict
    return SaveManager.save(dungeon, adventurer, map)
    print(f"Game saved.")

xingguo-huang and others added 30 commits February 4, 2022 10:22
Kevin and others added 30 commits February 23, 2022 20:12
…to contain dictionaries in json-friendly format. Saves these data into the saves table in the db. Added new table to sqlite db for saves. Tested saves, dicts, etc.
…actored tests, dungeon builder, save_manager to reflect this. Included additional column in app.db.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants