Skip to content

Commit d5b9da2

Browse files
committed
chore(20/2024): add day boilerplate
1 parent e724d17 commit d5b9da2

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/solutions/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ pub fn solution(day: DayNumber, year: Year) -> Box<dyn Solution> {
3232
16 => Box::new(year2024::day16::Day16),
3333
18 => Box::new(year2024::day18::Day18::default()),
3434
19 => Box::new(year2024::day19::Day19),
35+
20 => Box::new(year2024::day20::Day20),
3536
_ => panic!("Day not exist"),
3637
},
3738
Year::Year2023 => match i {

src/solutions/year2024/day20.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
use crate::solutions::Solution;
2+
3+
pub struct Day20;
4+
5+
impl Solution for Day20 {
6+
fn part_one(&self, _input: &str) -> String {
7+
String::from('0')
8+
}
9+
10+
fn part_two(&self, _input: &str) -> String {
11+
String::from('0')
12+
}
13+
}
14+
15+
#[cfg(test)]
16+
mod tests {
17+
use crate::solutions::year2024::day20::Day20;
18+
use crate::solutions::Solution;
19+
20+
const EXAMPLE: &str = r#""#;
21+
22+
#[test]
23+
fn part_one_example_test() {
24+
assert_eq!("0", Day20.part_one(EXAMPLE));
25+
}
26+
}

src/solutions/year2024/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ pub mod day15;
1616
pub mod day16;
1717
pub mod day18;
1818
pub mod day19;
19+
pub mod day20;

0 commit comments

Comments
 (0)