def GetUserName(): InstanceResource = clsResource() result = str(InstanceResource.username) return result, 200
def GetTimeofuser(): InstanceResource = clsResource() result = str(InstanceResource.GetLastTime()) return result, 200
def __init__(self): self.InstanceResource = clsResource()
print(underline) def InputNumber(caption): x = "0" while (True): x = str(input("Please enter the {} number:".format(caption))) if (not (x.isdigit())): print("Incorrect input.Please enter a number...") else: break return int(x) # Here the code starts ... InstanceResource = clsResource() loopnumber = 0 InstanceGame = clsGame() InstanceGame.InitMatrix() CurrentSign = 'X' IsGameOver = False while (loopnumber < InstanceResource.MatrixSize * InstanceResource.MatrixSize) and (IsGameOver == False): Print() IsCorrectSet = True while IsCorrectSet == True: CurrentSign = "X" if (loopnumber % 2 == 0) else "0" print('Player {}\n'.format(CurrentSign)) if (CurrentSign == "0") and (InstanceResource.ComputerPlayer == True):
def __init__(self): self.InstanceResource = clsResource() self.MatrixArray = [] self.FreePlaces = [] self.CurrentSign = ' '