Age | Commit message (Collapse) | Author |
|
At the moment, I can't figure out how to break up the long stem of a
T-shaped net properly (and other similar nets with 2 or more faces in a
straight line), for an arbitrary cuboid. This should be possible, and
was something I was hoping to be able to do for this puzzle.
That's not happening, so add in a hackish solution that takes advantage
of some of the conditions of the Advent of Code rules/input, instead of
being a properly general solution.
If possible, come back and take this out later.
|
|
This makes it so that, given cube face 0 is in map->faces[0] and
pointing north, cube face 1 will be in map->faces[1], cube face 2 will
be in map->faces[2], etc..., with their orientations set appropriately.
This will allow us to be able to tell where on the cube an elf is, and
where they're going if they walk off an edge.
|
|
|
|
I need this for working out the shape of the net
|
|
To figure out where you're going on a net (as far as I can figure) you
need to be able to tell which faces of a cube are connected to each
other, and which direction they are in relative to each other.
|
|
Process command-line options by re-using a different variable than the
one we were re-using before.
|
|
|
|
Having 'y' go down was easier with navigating through the memory buffer
we were using to store the map, but some of the work we'll have to do
with the cube net is easier for me to get my head around with a more
traditional coordinate system.
|
|
This will help with some future changes
|
|
A char won't do.
|
|
|
|
Rather than just a linear position in the map buffer
|
|
That way we will keep a proposed orientation change alongside the
position change.
|
|
It doesn't work yet...
|
|
|
|
This will help when just moving around can change the orientation, as
you move over an edge
|
|
|