def distance(pos1, pos2, old=False):
	if old:
		return abs(pos1[0]-pos2[0])+abs(pos1[1]-pos2[1])
		
	x_dist = abs(pos1[0]-pos2[0])
	y_dist = abs(pos1[1]-pos2[1])
	
	if x_dist > y_dist:
		return y_dist + (y_dist-x_dist)
	else:
		return x_dist + (y_dist-x_dist)
dataset/ETHPy150Open flags/Reactor-3/numbers.py/distance/swapped operands of `-`