Created genNeighbors method using manhattan distance.