Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
second beginner solution solution in Clear category for Xs and Os Referee by szperajacyzolw
def checkio(game_result):
gr=game_result
for n in range(3):
if gr[n][0]==gr[n][1]==gr[n][2] and not gr[n][0]=='.':
return gr[n][0]
break
elif gr[0][n]==gr[1][n]==gr[2][n] and not gr[0][n]=='.':
return gr[0][n]
break
if (gr[0][0]==gr[1][1]==gr[2][2] or gr[0][2]==gr[1][1]==gr[2][0]) and not gr[1][1]=='.':
return gr[1][1]
return 'D'
July 9, 2016
Comments: