jlechem / TextAdventure

A text adventure API framework
3 stars 0 forks source link

Implement Save Command #3

Open jlechem opened 6 years ago

jlechem commented 6 years ago

The same command is sort of done. However other commands like put/open could change an items object state and this needs to be taken into account.

Save has now been re-worked and is saving in the following format (in binary, so no manual editing of save files, at least easily).

The first line is the room id of the player and their score and their items.

RoomID Score ItemID (O|C|X for open,closed,NA)

If an item has sub items then it is followed by :ItemID (O|C|X) | where the number of items repeats until the pipe is found

Each room with an item then repeats in the above format

jlechem commented 6 years ago

Save has been re-worked.