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