Initial skeleton code for 2020

This commit is contained in:
2020-11-28 23:43:15 +01:00
parent 9726769253
commit cbbee3a01f
7 changed files with 222 additions and 0 deletions

19
2020/src/lib.rs Normal file
View File

@@ -0,0 +1,19 @@
use std::io::Read;
mod common;
mod day01;
pub trait Solution {
fn part1(&mut self, input: &mut dyn Read) -> String;
fn part2(&mut self, _input: &mut dyn Read) -> String {
unimplemented!("Still working on part 1");
}
}
pub fn get_implementation(day: usize) -> Box<dyn Solution> {
match day {
1 => Box::new(day01::Day01::default()),
_ => panic!("Unsupported day {}", day),
}
}