Back to Problem Solutions forum
http://www.codeabbey.com/index/task_solution?user=fravioferrari&task=tic-tac-toe&lang=Python
Tried to post the code, but format was rubbish.
I already spent several hours looking for a mistke, but couldnt find yet. So fresh eyes are welcome.
Well, the problem was that: disregard player1 is analysed first, IF the second player could win in the same round AND the [list of winners] have the (win player1 numbers) at the end of array... the bug will manifestate. P2 will win because his numbers are in the begining of [list of winners]. The chance of this occour is 1/8. So 16 answers right for 1 wrong kind of agree probabilisticaly.
I used this tool to visualize what was wrong: Interesting debug site http://www.pythontutor.com/visualize.html#togetherjs=jwdQHq1Tqs