when unit encounters an occupied cell then stop moving