I'm looking for the easiest way to save and load gamedata for a mastermind game. At the moment the things that need to be saved are, the number of colours being played with, the number of pegs being played with, how many guesses there have been and the actual answer. At the moment I'm saving all this information to a text file. I am having difficulty loading this information back in to the game, and have come across something called pickling. I've done some reading on it but I don't fully understand how it works and how it's different from the way I'm trying to do.
Thanks!