Module aoc::year2022::day10

source ·
Expand description

§Cathode-Ray Tube

Functions§

  • 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.
  • Converts between the 0-based indexing produced by the parse function and the 1-based indexing used by the problem statement.
  • Returns pixels as a multi-line String so that the entire function can be integration tested.