def touching(pos1, pos2):
    """ tells you if two positions are touching """
    if pos1[0] == pos2[0] and abs(pos1[1] - pos2[1]) == 1:
        return True
    if pos1[1] == pos2[1] and abs(pos1[0] - pos2[0]) == 1:
        return True
    return False