@property
def direction(self):
    if (self.node1.xy.x == self.node2.xy.x):
        direction = 'self'
    elif (self.node1.xy.x < self.node2.xy.x):
        if (self.dir == 'forward'):
            direction = 'right'
        else:
            direction = 'left'
    elif (self.dir == 'forward'):
        direction = 'left'
    else:
        direction = 'right'
    return direction
@property
def direction(self):
    if (self.node1.xy.x == self.node2.xy.x):
        direction = 'self'
    elif (self.node1.xy.x < self.node2.xy.x):
        if (self.dir == 'forward'):
            direction = 'right'
        else:
            direction = 'left'
    elif (self.dir == 'forward'):
        direction = 'left'
    else:
        direction = 'right'
    return direction