nskins / goby

Command-line role-playing game framework
MIT License
122 stars 56 forks source link

Save feature #87

Closed lsribeiro closed 7 years ago

lsribeiro commented 7 years ago

I implemented a simple save game feature, requested in #73. Instead of using JSON, I chose YAML, since it is easier to serialize ruby objects, and it is human-readable as well.

As for the load_game function, it catches an exception in case the save file doesn't exist or if it has a YAML syntax error and returns nil, but I think it could be severely improved.

Let me know if I did anything wrong.

nskins commented 7 years ago

Great work! Thanks for contributing!