Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 400 Bytes

day2.md

File metadata and controls

7 lines (5 loc) · 400 Bytes

Day 2: Dive!

Part 1

This is just some basic command parsing. A couple of state variables position and position are initialized to zero, and then each incoming command is parsed and executed against the state variables. We have the result once all commands are done.

Part 2

I reused the parsing code from part 1, but replaced the command parsing and added another state variable aim.