for direction in neighbors:
big_yx, small_yx = neighbors[direction]
if big_yx == YX(0,0) and \
dijkstra_map[small_yx] < dijkstra_map[pos] - 1:
dijkstra_map[pos] = dijkstra_map[small_yx] + 1
shrunk = True
for direction in neighbors:
big_yx, small_yx = neighbors[direction]
if big_yx == YX(0,0) and \
dijkstra_map[small_yx] < dijkstra_map[pos] - 1:
dijkstra_map[pos] = dijkstra_map[small_yx] + 1
shrunk = True