Hi Guys,I am having a bit of problem understanding the Logic in following piece of code from Tic Tac Toe example.Could anybody please explain me how the code works.. :sign0085:
B4X:
'Check diagonals
found = True
For i = 0 To 2
found = found AND Buttons(i, i).Text = Player
Next
If found = True Then Return True
found = True
For i = 0 To 2
found = found AND Buttons(i, 2 - i).Text = Player
Next
If found = True Then Return True
Return False