Update XO.c

check row and column