Almost finished

Result error (no bug) in secondary diagonal: Player X wins in turn 2
always.