One of tests is: ["OOO", "XX.", ".XX"]
Witch is impossible in-game input, since in this case game wood finished one move before. Something like this:["OOO",".X.",".XX"]
So my cool algorithm, witch based on counting X and O does't work:
checkio(gr):
r = gr[0]+gr[1]+gr[2]
x = r.count("X")
o = r.count("O")
if x > o and x+o < 9:
return "X"
elif o == x:
return "O"
else:
return "D"
Created at: 2014/12/22 03:26; Updated at: 2015/11/09 17:46