I think that pickling the data could be good, but since the data will be from a user (i.e. no guarantee it comes from our program), pickle might not be a good choice for security reasons.
We could probably dump it into a yaml file, but then it is very easy for users to cheat
(providing their own values), and it could require some extra work to set up the file format.
Is it possible to calculate an HMAC and/or encrypt the pickled data?
I think this would require some kind of secret, which would be less than ideal (imagine needing a password to access your game saves).
How should we go about saving the game to a file?
I think that pickling the data could be good, but since the data will be from a user (i.e. no guarantee it comes from our program), pickle might not be a good choice for security reasons.
We could probably dump it into a yaml file, but then it is very easy for users to cheat (providing their own values), and it could require some extra work to set up the file format.