|
@@ -19,7 +19,7 @@ moves = [(movement_lookup[move[0]], int(move[1:])) for move in input.split(', ')
|
19
|
19
|
heading = 0
|
20
|
20
|
history = [(0, 0)]
|
21
|
21
|
for move in moves:
|
22
|
|
- heading = (heading + move[0] + 4) % 4
|
|
22
|
+ heading = (heading + move[0]) % 4
|
23
|
23
|
delta = map(operator.mul, direction_lookup[heading], (move[1], move[1]))
|
24
|
24
|
delta_mag = max(abs(delta[0]), abs(delta[1]))
|
25
|
25
|
history += zip(steps(history[-1][0], delta[0], delta_mag),
|