Я пытаюсь создать систему рекордов для игры-капельницы, но понятия не имею, как.кто-нибудь может мне помочь?
я еще ничего не пробовал, я понятия не имею, с чего начать
from microbit import *
from random import *
import music
movable = True
playerPosition = 2
maxPlayerX = 4
minPlayerX = 0
fallingLightPosition = 0
fallingLightRow = 0
EMPTY_ROW = "00000:"
dropDelay = 50
playerLife = 9
lightShowing = False
gameOver = False
lightMovementTimer = dropDelay
score = 0
def checkForCatch():
global fallingLightRow
global fallingLightPosition
global playerPosition
global playerLife
global gameOver
global score
global dropDelay
if(fallingLightRow==4):
if(fallingLightPosition==playerPosition):
#gameOver = True
#player caughdet the light
#speed up the drops for ever two points earned
if score%2 is 0:
dropDelay-=5
#display.scroll("You win")
spawnLight()
music.play(music.BA_DING)
score+=1
else:
#dim the playerLife
playerLife-=3
#playerLife is not working properly, I need to add a switch for changing the number of lives the player has left
if(playerLife<=0):
#out of life, game over
gameOver = True
music.play(music.POWER_DOWN)
display.show(Image.SKULL)
sleep(1000)
display.scroll("Score: "+str(score))
#the light has hit the bottom so change the flag so another light will spawn
lightShowing = False
return
я хочу показать hghscore