Skip to content

Commit

Permalink
chore(20/2024): add day boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
manhunto committed Dec 20, 2024
1 parent e724d17 commit d5b9da2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/solutions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub fn solution(day: DayNumber, year: Year) -> Box<dyn Solution> {
16 => Box::new(year2024::day16::Day16),
18 => Box::new(year2024::day18::Day18::default()),
19 => Box::new(year2024::day19::Day19),
20 => Box::new(year2024::day20::Day20),
_ => panic!("Day not exist"),
},
Year::Year2023 => match i {
Expand Down
26 changes: 26 additions & 0 deletions src/solutions/year2024/day20.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use crate::solutions::Solution;

pub struct Day20;

impl Solution for Day20 {
fn part_one(&self, _input: &str) -> String {
String::from('0')
}

fn part_two(&self, _input: &str) -> String {
String::from('0')
}
}

#[cfg(test)]
mod tests {
use crate::solutions::year2024::day20::Day20;
use crate::solutions::Solution;

const EXAMPLE: &str = r#""#;

#[test]
fn part_one_example_test() {
assert_eq!("0", Day20.part_one(EXAMPLE));
}
}
1 change: 1 addition & 0 deletions src/solutions/year2024/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ pub mod day15;
pub mod day16;
pub mod day18;
pub mod day19;
pub mod day20;

0 comments on commit d5b9da2

Please sign in to comment.