summaryrefslogtreecommitdiff
path: root/22.c
AgeCommit message (Collapse)Author
2023-01-12Puzzle 22: Add functions for orienting a cubeAdam Spragg
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.
2023-01-12Puzzle 22: Remove unneeded variableAdam Spragg
Process command-line options by re-using a different variable than the one we were re-using before.
2023-01-12Puzzle 22: Simplify because map_elem() never returns '\n'Adam Spragg
2023-01-12Puzzle 22: Change coordinate system so that 'y' goes upAdam Spragg
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.
2023-01-12Puzzle 22: Create an abstraction for "map"Adam Spragg
This will help with some future changes
2023-01-12Puzzle 22: Use an `int` to hold the result of fgetc()Adam Spragg
A char won't do.
2023-01-03Puzzle 22: Change where we check for movement special casesAdam Spragg
2023-01-03Puzzle 22: Store elf position as x,y coordsAdam Spragg
Rather than just a linear position in the map buffer
2023-01-02Puzzle 22: Store proposed next position as an elfAdam Spragg
That way we will keep a proposed orientation change alongside the position change.
2023-01-02Puzzle 22: Add ability to select "net" map typeAdam Spragg
It doesn't work yet...
2023-01-02Puzzle 22: Allow for moving around changing our orientationAdam Spragg
2023-01-02Puzzle 22: Create "elf" type to hold position and orientationAdam Spragg
This will help when just moving around can change the orientation, as you move over an edge
2022-12-22Solve puzzle 22 part 1Adam Spragg