Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Clear solution in Clear category for Xs and Os Referee by ksc38317
def checkio(game_result):
dia=[ [] , [] ]
for i in range(3):
dia[0].append(game_result[i][i])
dia[1].append(game_result[i][::-1][i])
game_result = game_result + [''.join(x) for x in zip(*game_result)]\
+ [''.join(x) for x in dia]
if 'XXX' in game_result:
return 'X'
elif 'OOO' in game_result:
return 'O'
else:
return "D"
June 15, 2019
Comments: