Another application for day 11's breadth-first search.
This time I coded a bug into my next-node generation function which instead of checking if (newx, newy) was inside the grid boundary, was instead checking (newx, newx)
This cause the third part 1 test case to fail, but not the first two. It also didn't stop my code finding the correct part 1 answer.
I only found it because with that bug in place, running against part 2 turned into an exponential time problem, consuming all the memory in my VM.
I think I'm going to write a library implementation of BFS, using the problems so far as a specification for the required generality.