Block moving logic.