Converted rook movement calculation function to use the vector movement calculation.