Expand description
This is my solution for Advent of Code - Day 13: Claw Contraption
parse_input
Uses Machine::from_str
and Coords::from_str
to build the input into a list of Machine
s.
sum_prize_costs
solves both parts, taking an offset to be set to 10_000_000_000_000 for part 2. This uses
Machine::get_cost_for_prize
, and Machine::get_presses
to solve the machine’s equations.
Structs§
Functions§
- Turn the puzzle input into a list of machines by parsing each block separated by a blank line
- The entry point for running the solutions with the ‘real’ puzzle input.
- Use
Machine::get_cost_for_prize
to get the total cost over all valid machines