|
|
@@ -26,7 +26,27 @@ async def connect():
|
|
|
else:
|
|
|
print("could not find device")
|
|
|
|
|
|
-currentScore = 30
|
|
|
+#function that will recive the ESP32 data
|
|
|
+def getCurrentScore():
|
|
|
+ print(30)
|
|
|
+ #than do math to figure out power level
|
|
|
+ return 30
|
|
|
+
|
|
|
+
|
|
|
+names = []
|
|
|
+scores = []
|
|
|
+currentScore = getCurrentScore()
|
|
|
+highestScore = 100
|
|
|
+highScoreName = ""
|
|
|
+
|
|
|
+
|
|
|
+if currentScore > highestScore :
|
|
|
+ highestScore = currentScore
|
|
|
+ f = open("scores.txt", "rw")
|
|
|
+ #f.write(highestScore + highScoreName)
|
|
|
+ scores.append(highestScore)
|
|
|
+ names.append(highScoreName)
|
|
|
+
|
|
|
|
|
|
ctk.set_appearance_mode("System") # Modes: system (default), light, dark
|
|
|
ctk.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green
|
|
|
@@ -37,10 +57,6 @@ canvas = ctk.CTkCanvas(app, width=500, height=480,highlightthickness=0,)
|
|
|
canvas.config(background="white")
|
|
|
canvas.place(x=0,y=0)
|
|
|
|
|
|
-
|
|
|
-names = ["one","two","three","four","five"]
|
|
|
-scores = [1,2,3,4,5]
|
|
|
-
|
|
|
def placeLeaderboard():
|
|
|
canvas.create_rectangle(0, 0, 500, 500, fill="grey20", width=2) #grey14 to match background
|
|
|
|