def main():
    hex1 = Hexagon('0201')
hex2 = Hexagon('0302')
if hex1.neighbors() == ['0200', '0101', '0301', '0102', '0302', '0202']:
    print('Works for even columns.')
else:
    print('Failed for even columns.')
print(hex1.neighbors())
if hex2.neighbors() == ['0301', '0201', '0401', '0202', '0402', '0303']:
    print('Works for odd columns.')
else:
    print('Failed for odd columns.')
print(hex2.neighbors())
if __name__ == '__main__':
    main()
Поиск соседних соседей на шестиугольной сетке