Update stats.py
parent
7caa67e6c2
commit
23254b3d89
20
stats.py
20
stats.py
|
@ -1,11 +1,11 @@
|
||||||
import pygame
|
import pygame
|
||||||
|
|
||||||
class Stats():
|
class Stats():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.reset_stats()
|
self.reset_stats()
|
||||||
self.run_game = True
|
self.run_game = True
|
||||||
with open("highscore.txt", "r") as f:
|
with open("highscores.txt", "r") as f:
|
||||||
self.high_score = int(f.readline())
|
self.high_score = int(f.readline())
|
||||||
def reset_stats(self):
|
def reset_stats(self):
|
||||||
self.guns_left = 3
|
self.guns_left = 3
|
||||||
self.score = 0
|
self.score = 0
|
Loading…
Reference in New Issue