checking for illegal moves
checking for draw