Pulled out code into Timer.py

Made a separate class instead of keeping it in GameLogic.
This commit is contained in:
otomo otonami 2022-08-15 07:28:17 +03:00
parent 9c9db7aba9
commit 446ffba554

View File

@ -1,7 +1,6 @@
from datetime import datetime, time
from GameMap import * from GameMap import *
from Player import * from Player import *
from Timer import *
class GameLogic(): class GameLogic():
@ -44,14 +43,3 @@ class GameLogic():
else: else:
return False return False
return True return True
def get_time(self):
return str(datetime.now() - self.startTime)
def reset_time(self):
self.startTime = datetime.now()
def get_score(self):
return self.score