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 sebastian.okseniuk
def checkio(game_result):
fld = game_result
for row in fld:
if row[0] == row[1] == row[2] != ".":
return row[0]
if fld[0][0] == fld[1][1] == fld[2][2] != ".":
return fld[1][1]
if fld[2][0] == fld[1][1] == fld[0][2] != ".":
return fld[1][1]
for column in range(3):
if fld[0][column] == fld[1][column] == fld[2][column] != '.':
return fld[0][column]
return "D"
checkio(["X.O","XX.","XOO"])
Dec. 2, 2015