Accounted for diagonals when choosing new path