Categories
Mastering Development

Knight Tour Backstracking with Warndorff rule improvement

The assignment said that I could improve it with Warnsdorff’s algorithm with int CountVisitedNeighbors(). Use this function to compare all of the knight’s possible moves. Choose the next move where the most neighbors have already been visited. *** static int BoardSize = 8; static int attemptedMoves = 0; / xMove[] and yMove[] define next move […]