Function ADS::knightDistance

Function Documentation

inline int ADS::knightDistance(int n, GridCell s, GridCell t)

knightDistance(): the fewest moves of a knight from s to t on an n x n board, INF if it cannot get there

Pre:

n > 0, s and t are squares of the board