This works, but it is too cryptic. I would suggest using the NEIGHBORS array in the Coordinates class. Simply keep track of the last move (like you're doing) then loop through the surrounding four points, no need to generate your own neighbors array.

Right idea though.