AoC 2019 D11: Space Police
| Problem statement | Source code | Tags: IntcodeManual inspection
← Previous Back to AoC Index Next →
The only additional capability from day 7 is that instead of having one number output at a time, the program now produces two outputs before pausing. Since the size is fixed, I just call run_until_output() twice to get both outputs.
Both parts work the same way. I keep track of the robot's position and direction, and a map of painted panels. Each time, I use send_input() to provide the current panel color, then call run_until_output() to get the new color and direction. Abstractly:
Again, I take a second to admire the ASCII art in part 2: