Skip to content

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

@GurveerSingh123

Description

@GurveerSingh123

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions