Reworked distance related methods
Re implemented path checking.
Merge pull request #1 from Richiecakes/board-distance

Merging board-distance branch into master.