I have not used pickle but that should be able to save your Player class objects. The general flow of using these is pretty simple.
Pickle, JSON, TOML would probalby do the trick. Deal with input validation / self explanatory (stuff like your get_pos_int)Ģ.) Decide on a data format for your player saves.Deal with the game display / Optional could be rolled into 2.Deal with game logic / create rows, handle balance changes and calculations etc.Deal with player data / create, pull up, set as active player for the game etc.Print(f'You've played a total of game(s).')īet_choices = ġ.) You should make more classes to separate functionality in meaningful ways.įrom a quick glance, here I would separate the functions into three or four groups.
If get_bool('Start New game or Continue existing game? (n / c): ', 'n', 'c'):