diff options
author | Viljami Ilola <+@hix.fi> | 2024-04-08 02:06:05 +0300 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-04-08 02:06:05 +0300 |
commit | eeac2c3bd87c542c48c806a98ea8c7c22db6dfc2 (patch) | |
tree | 37e5077d4dcb1d6d2dc2aefdac6bf792383e76be /src/sliceitoff/hiscores/hiscores.py | |
parent | 3bae12a5c5104e606c6958b8d52ca75c4cbcacba (diff) |
initial highscores
Diffstat (limited to 'src/sliceitoff/hiscores/hiscores.py')
-rw-r--r-- | src/sliceitoff/hiscores/hiscores.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sliceitoff/hiscores/hiscores.py b/src/sliceitoff/hiscores/hiscores.py index 1b3b87f..a6c2bf0 100644 --- a/src/sliceitoff/hiscores/hiscores.py +++ b/src/sliceitoff/hiscores/hiscores.py @@ -1,7 +1,7 @@ """ hiscores.hiscores - high socres: loading, saving, converting to string""" import os -MAX_HIGHSCORES = 20 +from .static import INITIAL_HIGHSCORES, MAX_HIGHSCORES class HiScores: """ Keeps track of high scores """ @@ -13,7 +13,7 @@ class HiScores: ".config", "sliceitoffrc") if not os.path.isfile(self.config_filename): - self.table=[(0,"") for _ in range(MAX_HIGHSCORES)] + self.table=INITIAL_HIGHSCORES[:] return with open(self.config_filename, "r", encoding="utf-8") as config_file: for line in config_file: |