Minimize moves by moving more than one tile far (C++11)