separated rook_hop function out for reuse in rookcheck file