Fork me on GitHub
#adventofcode
<
2016-12-02
>
abarylko15:12:56

@fellshard Same here... I did that for a bit...

fellshard16:12:48

That's what I love about these puzzles; the part A with hidden part B tests how you decide to reuse, refactor, and remodel your solution when confronted with change. It really is superb practice.

mnespor19:12:52

It really is. I had created a function that returns all the intermediate points in a line segment, but in retrospect I wish I'd done something like R8 L4 => R 1 1 1 1 1 1 1 1 L 1 1 1 1 instead

fellshard19:12:36

Basically what I ended up doing, translated relative rotations and steps into static directions, e.g. :east :east :east :north :north :west

fellshard19:12:06

from there it's trivial to generate a sequence of points visited