Function ADS::knightTour
Defined in File KnightTour.h
Function Documentation
-
inline std::optional<std::vector<std::vector<int>>> ADS::knightTour(int n, int x, int y, bool warnsdorff = true)
a tour of the knight from ( x , y ) on an n x n board, by backtrack, the moves in the order of the book or by the rule of Warnsdorff; none for n < 1, where there is no board
- Pre:
( x , y ) on the board if n >= 1
- Post:
a tour of knight moves from ( x , y )