Improve Pos
This commit is contained in:
parent
651ccb9cba
commit
88be9a39a0
6 changed files with 649 additions and 45 deletions
|
|
@ -19,6 +19,7 @@ mod day18;
|
|||
mod day19;
|
||||
mod day20;
|
||||
mod day21;
|
||||
mod day22;
|
||||
mod template;
|
||||
|
||||
pub use template::DayTrait;
|
||||
|
|
@ -28,7 +29,7 @@ pub mod day_provider {
|
|||
use super::*;
|
||||
use thiserror::Error;
|
||||
|
||||
const MAX_DAY: usize = 21;
|
||||
const MAX_DAY: usize = 22;
|
||||
|
||||
pub fn get_day(day_num: usize) -> Result<Box<dyn DayTrait>, ProviderError> {
|
||||
match day_num {
|
||||
|
|
@ -53,6 +54,7 @@ pub mod day_provider {
|
|||
19 => Ok(Box::new(day19::Day)),
|
||||
20 => Ok(Box::new(day20::Day)),
|
||||
21 => Ok(Box::new(day21::Day)),
|
||||
22 => Ok(Box::new(day22::Day)),
|
||||
_ => Err(ProviderError::InvalidNumber(day_num)),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue