From b6afb5450e067294bc41e55a2d796b1add828dc3 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Wed, 11 Dec 2019 23:31:19 -0500 Subject: [PATCH] New_High_Score method added. --- libstormgames.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libstormgames.py b/libstormgames.py index 8fa15b6..ed84171 100755 --- a/libstormgames.py +++ b/libstormgames.py @@ -74,6 +74,11 @@ class scoreboard(): def Increase_Score(self, points = 1): self.score += points + def New_High_Score(self): + for i, j in enumerate(self.oldScores): + if self.score > j: return i + 1 + return None + def Update_Scores(self): # Update the scores for i, j in enumerate(self.oldScores):