Skip to content

Commit 7badca2

Browse files
authored
rename filename high_score.txt
1 parent edc040d commit 7badca2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PyGamesScripts/Snake Game/Enhanced/scoreboard.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ def __init__(self):
1616

1717
# get and store highest score
1818
def get_high_score(self):
19-
with open("data.txt", mode="r") as file_score:
19+
with open("high_score.txt", mode="r") as file_score:
2020
self.high_score = int(file_score.read())
2121

2222
def set_high_score(self):
23-
with open("data.txt", mode="w") as file_score:
23+
with open("high_score.txt", mode="w") as file_score:
2424
file_score.write(f"{self.score}")
2525

2626
# increment score

0 commit comments

Comments
 (0)