Module day10

Source
Expand description

§Cathode-Ray Tube

Functions§

parse
Tokenizes the input treating both “noop” and “addx” as no-ops to obtain the correct instruction timing. Produces a vec of the absolute values of x from cycle 0 to 241.
part1
Converts between the 0-based indexing produced by the parse function and the 1-based indexing used by the problem statement.
part2
Returns pixels as a multi-line String so that the entire function can be integration tested.