We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edc040d commit 7badca2Copy full SHA for 7badca2
PyGamesScripts/Snake Game/Enhanced/scoreboard.py
@@ -16,11 +16,11 @@ def __init__(self):
16
17
# get and store highest score
18
def get_high_score(self):
19
- with open("data.txt", mode="r") as file_score:
+ with open("high_score.txt", mode="r") as file_score:
20
self.high_score = int(file_score.read())
21
22
def set_high_score(self):
23
- with open("data.txt", mode="w") as file_score:
+ with open("high_score.txt", mode="w") as file_score:
24
file_score.write(f"{self.score}")
25
26
# increment score
0 commit comments