NxN sliding block puzzle generator and solver