|
@@ -30,12 +30,16 @@ def getCurrentScore():
|
|
|
|
|
|
|
|
|
|
|
|
|
currentScore = getCurrentScore()
|
|
currentScore = getCurrentScore()
|
|
|
-highestScore = 0
|
|
|
|
|
|
|
+highestScore = 100
|
|
|
|
|
+highScoreName = ""
|
|
|
|
|
|
|
|
-if currentScore < highestScore :
|
|
|
|
|
|
|
+
|
|
|
|
|
+if currentScore > highestScore :
|
|
|
highestScore = currentScore
|
|
highestScore = currentScore
|
|
|
f = open("scores.txt", "rw")
|
|
f = open("scores.txt", "rw")
|
|
|
- f.write(highestScore)
|
|
|
|
|
|
|
+ f.write(highestScore + highScoreName)
|
|
|
|
|
+ scores.append(highestScore)
|
|
|
|
|
+ names.append(highScoreName)
|
|
|
|
|
|
|
|
|
|
|
|
|
async def main():
|
|
async def main():
|
|
@@ -52,8 +56,8 @@ canvas.config(background="white")
|
|
|
canvas.place(x=0,y=0)
|
|
canvas.place(x=0,y=0)
|
|
|
|
|
|
|
|
|
|
|
|
|
-names = ["one","two","three","four","five"]
|
|
|
|
|
-scores = [1,2,3,4,5]
|
|
|
|
|
|
|
+names = []
|
|
|
|
|
+scores = []
|
|
|
|
|
|
|
|
def placeLeaderboard():
|
|
def placeLeaderboard():
|
|
|
canvas.create_rectangle(0, 0, 500, 500, fill="grey20", width=2) #grey14 to match background
|
|
canvas.create_rectangle(0, 0, 500, 500, fill="grey20", width=2) #grey14 to match background
|