Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
4-liner: complex plane over and over again solution in Creative category for Identify Block by przemyslaw.daniel
def identify_block(n, k=(144, -16, 12-16j, 32-24j, 32+24j, 12+16j, 4)):
n = [complex(*divmod(i-1, 4)[::-1]) for i in n]
s = eval('*'.join(str(x-y) for x in n for y in n if 1 <= abs(x-y)))
return 'ITSJLZO'[k.index(s)] if s in k else None
Sept. 2, 2018
Comments: