Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Second solution in Clear category for Xs and Os Referee by gyahun_dash
def checkio(result):
rows = result
cols = map(''.join, zip(*rows))
diags = map(''.join, zip(*[(r[i], r[2 - i]) for i, r in enumerate(rows)]))
lines = rows + list(cols) + list(diags)
return 'X' if ('XXX' in lines) else 'O' if ('OOO' in lines) else 'D'
April 12, 2014
Comments: