save in-game state of character in a class