Data-persistence with tempPlayer
https://github.com/Adilkhan-111/Data-persistence-project.git
This project was challenging. At first, I thought I could handle everything by saving the player's best score in a separate list, but that approach turned out to be a mistake — it was complicated and unclear.
The next day, I took a piece of paper and started sketching. Slowly but surely, after about 30 minutes, I came up with the idea to use a temporary player.
With this temporary player, I was able to record the necessary data. If the main player beats the temporary player's record, then the main player becomes the new temporary player. Otherwise, nothing changes.