2

Let's do the code, so all the details are down. Encoding dictionary: codes, i = {}, 0 for nSquares in range(1,8): for direction in ["N", "NE", "E", "SE", "S", "SW", "W", "NW"]: codes[(nSquares,direction)] = i i += 1 You'll see that the codes dictionary will ...


Only top voted, non community-wiki answers of a minimum length are eligible