Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
precounting solution in Clear category for Square Board by David_Jones
def square_board(side, token, steps):
side -= 1
coordinates = {}
for i in range(4*side):
if i < side:
coordinates[i] = (side, side-i)
elif i < 2*side:
coordinates[i] = (2*side-i, 0)
elif i < 3*side:
coordinates[i] = (0, i-2*side)
else:
coordinates[i] = (i-3*side, side)
return coordinates[(token+steps)%(4*side)]
June 3, 2019
Comments: