in reply to Find solution to knight's tour
There's a similar puzzle considered in the thread "How to debug a long while loop", so maybe that would help.