Mini_Python_Projects icon indicating copy to clipboard operation
Mini_Python_Projects copied to clipboard

In WordLadder: Adding valid cache for word validation, word list file existence check, and viewing high scores

Open GurveerSingh123 opened this issue 2 months ago • 0 comments

Issues in Game WordLadder

  1. Repeated API calls in is_valid_word() cause slow gameplay and potential rate-limit errors also cause create a delay after inputting the word.
  2. Program crashes when wordList.txt is missing or misplaced.
  3. No option to view high scores even though they are saved in highscores.json they can be shown to player in run time.

Solutions

  1. Implement a cache dictionary (valid_cache) to store API results and avoid repeated lookups also saves times.
  2. Add a file existence check using os.path.exists() before opening wordList.txt to prevent crashes.
  3. Introduce a "View High Scores" menu option that reads and displays results from highscores.json for better user experience.

Please assign this task to me, i want to contribute and fix the issues :)

GurveerSingh123 avatar Oct 25 '25 17:10 GurveerSingh123