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 kezikov.maxim
def checkio(game_result):
game_result += [game_result[0][i] + game_result[1][i] + game_result[2][i] for i in range(3)] # columns
game_result += [''.join(game_result[i][i] for i in range(3))] # first diagonal
game_result += [''.join(game_result[i][2 - i] for i in range(3))] # second diagonal
if 'XXX' in game_result: return 'X'
return 'O' if 'OOO' in game_result else 'D'
July 31, 2019