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 vikulin
def checkio(game_result):
transposed = list(zip(*game_result))
diagonal1 = [[game_result[i][i] for i in range(3)]]
diagonal2 = [[game_result[i][-i-1] for i in range(3)]]
for row in game_result + transposed + diagonal1 + diagonal2:
s = set(row)
if len(s) == 1 and not '.' in s:
return s.pop()
return "D"
Sept. 27, 2014
Comments: