コード例 #1
0
 def GetUserName():
     InstanceResource = clsResource()
     result = str(InstanceResource.username)
     return result, 200
コード例 #2
0
 def GetTimeofuser():
     InstanceResource = clsResource()
     result = str(InstanceResource.GetLastTime())
     return result, 200
コード例 #3
0
 def __init__(self):
     self.InstanceResource = clsResource()
コード例 #4
0
            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):
コード例 #5
0
ファイル: Game.py プロジェクト: DavidFitoussi/Tictactoo
 def __init__(self):
     self.InstanceResource = clsResource()
     self.MatrixArray = []
     self.FreePlaces = []
     self.CurrentSign = ' '