Updated scoreboard.

This commit is contained in:
Storm Dragon 2020-08-30 01:23:32 -04:00
parent 67d2315cef
commit 21c0795ea9

View File

@ -42,7 +42,7 @@ class scoreboard():
try:
localConfig.add_section("scoreboard")
except:
pass
speak("Could not create scoreboard.")
self.score = startingScore
self.oldScores = []
for i in range(1, 11):
@ -60,7 +60,7 @@ class scoreboard():
try:
write_config()
except:
pass
speak("Could not update configuration file."
def Decrease_Score(self, points = 1):
self.score -= points
@ -84,7 +84,7 @@ class scoreboard():
for i, j in enumerate(self.oldScores):
if self.score > j:
# Move the old high score down the list
if i < 10:
if i < 9:
self.oldScores[i + 1] = j
self.oldScores[i] = self.score
break