Hydra
Hydra copied to clipboard
Labyrinth: Add file save / load
Add a possibility to save and load the game from a text file.
Commands:
save <file_name>
load <file_name>
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