use crate::utils::solution::Solution; pub mod day_01_trebuchet; pub mod day_02_cube_conundrum; pub mod day_03_gear_ratios; pub mod day_04_scratchcards; pub mod day_06_wait_for_it; pub fn run(day: &str) { let solution: Box = match day { "1" => Box::new(day_01_trebuchet::Day1Solution), "2" => Box::new(day_02_cube_conundrum::Day2Solution), "3" => Box::new(day_03_gear_ratios::Day3Solution), "4" => Box::new(day_04_scratchcards::Day4Solution), "6" => Box::new(day_06_wait_for_it::Day6Solution), _ => panic!("Invalid day specified"), }; // Call part_one and part_two on the solution instance println!("Part One Result: {}", solution.part_one()); println!("Part Two Result: {}", solution.part_two()); }