The snaking logic contains a lot of caching/optimisations and offsetting of the path which is tedious to re-compute when the path changes.