A distance function has been added.

Distance is calculated using the Manhattan distance method.