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 lexin13
def checkio(game_result):
if game_result[0][0] == game_result[1][1] == game_result[2][2] != '.':
return game_result[0][0]
if game_result[0][2] == game_result[1][1] == game_result[2][0] != '.':
return game_result[0][2]
for x in range(3):
if game_result[x][0] == game_result[x][1] == game_result[x][2] != '.':
return game_result[x][0]
for x in range(3):
if game_result[0][x] == game_result[1][x] == game_result[2][x] != '.':
return game_result[0][x]
return "D"
March 15, 2016
Comments: