class ThingBase:
type_ = '?'
- def __init__(self, world, id_=None, position=[0,0]):
+ def __init__(self, world, id_=None, position=(0,0)):
self.world = world
self.position = position
if id_ is None:
neighbors = dijkstra_map.get_neighbors(tuple(self.position))
n = n_max
target_direction = None
- for direction in neighbors:
+ for direction in sorted(neighbors.keys()):
yx = neighbors[direction]
if yx is not None:
n_new = dijkstra_map[yx]