2022-07-25 15:16:15 +00:00
|
|
|
from datetime import datetime, time
|
|
|
|
|
2022-07-25 14:46:45 +00:00
|
|
|
from GameMap import *
|
|
|
|
from Player import *
|
|
|
|
|
2022-07-25 10:33:08 +00:00
|
|
|
class GameLogic():
|
2022-07-25 14:46:45 +00:00
|
|
|
|
2022-08-07 06:22:06 +00:00
|
|
|
def __init__(self, gameMap, playerList, winRowLength = 3, individualMoves = 1):
|
2022-07-25 14:46:45 +00:00
|
|
|
|
|
|
|
self.gameMap = gameMap
|
|
|
|
self.playerList = playerList
|
|
|
|
self.winRowLength = winRowLength
|
|
|
|
self.individualMoves = individualMoves
|
|
|
|
self.score = 0
|
|
|
|
|
|
|
|
self.wait_for_input()
|
|
|
|
|
|
|
|
|
|
|
|
def wait_for_input(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
def check_for_win(self, playerList):
|
|
|
|
for player in playerList:
|
|
|
|
pass
|
|
|
|
|
|
|
|
def get_time(self):
|
2022-07-25 15:16:15 +00:00
|
|
|
return str(datetime.now() - self.startTime)
|
2022-07-25 14:46:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
def reset_time(self):
|
2022-07-25 15:16:15 +00:00
|
|
|
self.startTime = datetime.now()
|
2022-07-25 14:46:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
def get_score(self):
|
|
|
|
return self.score
|