From eeac2c3bd87c542c48c806a98ea8c7c22db6dfc2 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Mon, 8 Apr 2024 02:06:05 +0300 Subject: initial highscores --- src/sliceitoff/hiscores/hiscores.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sliceitoff/hiscores/hiscores.py') 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: -- cgit v1.2.3