Update highscores_data to be an overarching class for all data.

This commit is contained in:
alwayscompiling
2022-08-02 16:16:45 -04:00
parent 1b4f0362b5
commit 262bcd07b9
2 changed files with 56 additions and 270 deletions
+6
View File
@@ -111,6 +111,12 @@ class Category:
sorted(self._scores_map.items(), key=lambda x: x[1].value, reverse=not self.ascending)
)
def clear(self) -> None:
"""
Clears all Scores tracked in score map. This is a test function and shouldn't really be used.
"""
self._scores_map.clear()
def get_user_score(self, user: str) -> Score:
"""
Gets a user's score. Returns None if user is not found.