summaryrefslogtreecommitdiff
path: root/src/sliceitoff
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff')
-rw-r--r--src/sliceitoff/hiscores/hiscores.py19
-rw-r--r--src/sliceitoff/hiscores/static.py2
2 files changed, 13 insertions, 8 deletions
diff --git a/src/sliceitoff/hiscores/hiscores.py b/src/sliceitoff/hiscores/hiscores.py
index 372db31..627c3f7 100644
--- a/src/sliceitoff/hiscores/hiscores.py
+++ b/src/sliceitoff/hiscores/hiscores.py
@@ -6,16 +6,21 @@ from .static import INITIAL_HIGHSCORES, MAX_HIGHSCORES
class HiScores:
""" Keeps track of high scores """
- def __init__(self):
+ def __init__(self, filename = None):
""" On creation load high scores from config file """
self.table=[]
- if os.name == 'nt':
- self.config_filename = os.path.join(Path.home(), "sliceitoff.cfg")
+ if filename:
+ self.config_filename = filename
else:
- self.config_filename = os.path.join(
- Path.home(),
- ".config",
- "sliceitoffrc")
+ if os.name == 'nt':
+ self.config_filename = os.path.join(
+ Path.home(),
+ "sliceitoff.cfg")
+ else:
+ self.config_filename = os.path.join(
+ Path.home(),
+ ".config",
+ "sliceitoffrc")
if not os.path.isfile(self.config_filename):
self.table=INITIAL_HIGHSCORES[:]
return
diff --git a/src/sliceitoff/hiscores/static.py b/src/sliceitoff/hiscores/static.py
index cf17ba8..65a032e 100644
--- a/src/sliceitoff/hiscores/static.py
+++ b/src/sliceitoff/hiscores/static.py
@@ -19,7 +19,7 @@ INITIAL_HIGHSCORES = [
(10000, "-O-"),
(8000, "-F-"),
(6000, "-F-"),
- (4000, "-!-"),
+ (4000, "---"),
(2000, "---"),
(0, "---")
]