'Checks if self is equal to other inside radius of forgiveness
(default 10 px).
Args:
self, other: [x, y] or [[x, y], r], where r is radius of
forgiveness;
x, y, r: int
Returns: bool.'

def coordinate_positions_compare(self, other, r=10):

    if isinstance(self[0], list):
        r = max(self[1], r)
        (x1, y1) = self[0]
    else:
        (x1, y1) = self
    if isinstance(other[0], list):
        r = max(other[1], r)
        (x2, y2) = other[0]
    else:
        (x2, y2) = other
    if ((((x2 - x1) ** 2) + ((y2 - y1) ** 2)) > (r * r)):
        return False
    return True
