Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Xs and Os Referee by ClementBC
def checkio(t):
for x, y in [(0, 0), (1, 0), (2, 0), (0, 2), (0, 1)]:
for d, e in [(1, 0), (0, 1), (1, 1), (1, -1)]:
if 0 <= x + 2 * d < 3 and 0 <= y + 2 * e < 3:
if t[x][y] == t[x + d][y + e] == t[x + 2 * d][y + 2 * e]:
if t[x][y] != '.':
return(t[x][y])
return('D')
April 19, 2016
Comments: