isLegalMoveforQueen method added