pub mod day01;
pub mod day02;
+// pub mod day03;
+// pub mod day04;
+// pub mod day05;
+// pub mod day06;
+// pub mod day07;
+// pub mod day08;
+// pub mod day09;
+// pub mod day10;
+// pub mod day11;
+// pub mod day12;
+// pub mod day13;
+// pub mod day14;
+// pub mod day15;
+// pub mod day16;
+// pub mod day17;
+// pub mod day18;
+// pub mod day19;
+// pub mod day20;
+// pub mod day21;
+// pub mod day22;
+// pub mod day23;
+// pub mod day24;
+// pub mod day25;
+
+type Part = fn();
+
+const DAYS: [(Part, Part); 2] = [
+ (day01::part1 as fn(), day01::part2 as fn()),
+ (day02::part1 as fn(), day02::part2 as fn()),
+ // (day03::part1 as fn(), day03::part2 as fn()),
+ // (day04::part1 as fn(), day04::part2 as fn()),
+ // (day05::part1 as fn(), day05::part2 as fn()),
+ // (day06::part1 as fn(), day06::part2 as fn()),
+ // (day07::part1 as fn(), day07::part2 as fn()),
+ // (day08::part1 as fn(), day08::part2 as fn()),
+ // (day09::part1 as fn(), day09::part2 as fn()),
+ // (day10::part1 as fn(), day10::part2 as fn()),
+ // (day11::part1 as fn(), day11::part2 as fn()),
+ // (day12::part1 as fn(), day12::part2 as fn()),
+ // (day13::part1 as fn(), day13::part2 as fn()),
+ // (day14::part1 as fn(), day14::part2 as fn()),
+ // (day15::part1 as fn(), day15::part2 as fn()),
+ // (day16::part1 as fn(), day16::part2 as fn()),
+ // (day17::part1 as fn(), day17::part2 as fn()),
+ // (day18::part1 as fn(), day18::part2 as fn()),
+ // (day19::part1 as fn(), day19::part2 as fn()),
+ // (day20::part1 as fn(), day20::part2 as fn()),
+ // (day21::part1 as fn(), day21::part2 as fn()),
+ // (day22::part1 as fn(), day22::part2 as fn()),
+ // (day23::part1 as fn(), day23::part2 as fn()),
+ // (day24::part1 as fn(), day24::part2 as fn()),
+ // (day25::part1 as fn(), day25::part2 as fn()),
+];
fn main() {
- day01::part1();
- day01::part2();
- day02::part1();
- day02::part2();
+ let args: Vec<String> = std::env::args().collect();
+ let day: usize = args
+ .get(1)
+ .expect("Please provide a day.")
+ .parse()
+ .expect("The day should be a number.");
+ if day < 1 || day > DAYS.len() {
+ panic!("That day hasn't been implemented yet!");
+ }
+ DAYS[day - 1].0();
+ DAYS[day - 1].1();
}