Combined moves method and paths function.