day08 finished

This commit is contained in:
Ruediger Ludwig 2023-02-05 09:36:50 +01:00
parent 745abc936e
commit a2f7808f6d
4 changed files with 339 additions and 1 deletions

View file

@ -5,6 +5,7 @@ mod day04;
mod day05;
mod day06;
mod day07;
mod day08;
mod template;
pub use template::DayTrait;
@ -14,7 +15,7 @@ pub mod day_provider {
use super::*;
use thiserror::Error;
const MAX_DAY: usize = 7;
const MAX_DAY: usize = 8;
pub fn get_day(day_num: usize) -> Result<Box<dyn DayTrait>, ProviderError> {
match day_num {
@ -25,6 +26,7 @@ pub mod day_provider {
5 => Ok(Box::new(day05::Day)),
6 => Ok(Box::new(day06::Day)),
7 => Ok(Box::new(day07::Day)),
8 => Ok(Box::new(day08::Day)),
_ => Err(ProviderError::InvalidNumber(day_num)),
}
}