danieltian / knightboard Goto Github PK
View Code? Open in Web Editor NEWC# project that finds the first valid solution for how a knight should move (obeying chess laws for a knight) on a N x M chess board so that it visits each square only once and will visit all the squares. It will show the solution in a console window step by step and is advanced by pressing enter. The size of the board can be changed by changing the values of the maxX and maxY variables.