abidurrahman11 / Pygame-Racing-Car

Pygame Racing Car is a beginner-friendly open source project on GitHub aimed at improving the Pygame-based racing car game. This repository welcomes contributions from anyone interested in enhancing the game's features and functionality.
MIT License
12 stars 20 forks source link

cargame.py: added high score tracking by loading top 5 high scores to… #17

Closed RubyShanks closed 11 months ago

RubyShanks commented 11 months ago

cargame.py: Updated game_over() function to update and save top 5 high scores data to high_scores.txt file and show top 5 high scores to the player at the game over screen. PFA screenshot of the same.

pr_eg

RubyShanks commented 11 months ago

Also please note that the high_scores.txt file is initially kept empty intentionally but when the player starts playing his scores will get added to this file in the form of space separated numbers. Eg. "19581 2163 2119 1320 1308 "