Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labyrinth: Add file save / load #53

Open
graninas opened this issue Jun 2, 2020 · 1 comment
Open

Labyrinth: Add file save / load #53

graninas opened this issue Jun 2, 2020 · 1 comment

Comments

@graninas
Copy link
Owner

graninas commented Jun 2, 2020

Add a possibility to save and load the game from a text file.

Commands:
save <file_name>
load <file_name>

@graninas
Copy link
Owner Author

graninas commented Jun 2, 2020

Tips on the task.

  • Serialization to and from text can be done using either of the two approaches:
    • Show / Read
    • ToJSON / FromJSON (preferred)
  • There should be a serializable data type which contains all the information about the game to be saved / loaded. This data type should include:
    • Labyrinth itself
    • Player position
    • Treasure position
    • Game state

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

No branches or pull requests

1 participant