So I'm trying to run a while loop, which should ideally stop when winner is either True or False. The table.isWinner() method returns either one of these values. But the loop for some reason is not getting stopped, until outerCount is bigger than tableColNum*tableRowNum (the other condition).
tableRowNum = table.getNumRows()
tableColNum = table.getNumColumns()
stackNum = table.getNumStacks()
winner = None
outerCount = 0
while winner == None and outerCount < tableColNum*tableRowNum:
for i in range(tableRowNum):
for j in range(tableColNum):
domino = table.select(i, j)
played = None
count = 0
while count < stackNum and not played:
played = table.playDomino(domino, count)
count += 1
print(table)
winner = table.isWinner()
print(winner)
outerCount += 1