This solution solves the knight tour problem using Warnsdorff's Algorithm for knight tour.
No installation needed, just run index.html file
- You can find demo here
- To run it, click a square, and follow the indicator for the next step
-
For now, the board is 8x8, but in knight.js file, if you edit the number n on top of the file, you can change the board size. The same goes for canvas size.
-
The number on top left of each sqaure represents the possible moves if you are in that square
-
The number on the bottom right of each square represents the current value of that block, 0 if not visited, 1 if visited.