Code cleanup, reachable points
detect closest coordinate on the board