Skip to content

💡 [Feature]: Add SQLite Support for Persistent High Scores in Games #972

@knoxiboy

Description

@knoxiboy

❓ Problem Statement

Currently, high scores for terminal games (like Whack-a-Mole or Typing Speed Tester) are likely lost when the script exits, or they are saved in brittle flat .txt files (e.g., game_results.txt).

🚀 Proposed Enhancement

Implement a lightweight SQLite database wrapper to securely and reliably store user profiles, game statistics, and high scores across all terminal games.

��️ Suggested Implementation

  1. Create a utils/db_manager.py that initializes a local data.db file using the built-in sqlite3 module.
  2. Provide simple CRUD functions: save_score(game, user, score) and get_top_scores(game).
  3. Update the game scripts to query and display the top 5 high scores at the end of a session.

Additional Notes

  • I am a registered GSSoC 2026 contributor.
  • I would like to implement this feature myself.

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