Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Xs and Os Referee by mdroz
def checkio(game_result):
for char in game_result:
if char[0] == char[1] == char[2] and char[0] != ".":
return char[0]
if game_result[0][0] == game_result[1][1] == game_result[2][2] and game_result[0][0] != ".":
return game_result[0][0]
rotated = zip(*game_result)
for tip in rotated:
if tip[0] == tip[1] == tip[2] and tip[0] != ".":
return tip[0]
if game_result[0][2] == game_result[1][1] == game_result[2][0] and game_result[0][2] != ".":
return game_result[0][2]
return "D"
Oct. 23, 2017