Skip to content

Commit bf1694b

Browse files
committed
chore(22/2024): add day boilerplate
1 parent 00c13a9 commit bf1694b

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
| [Day 19: Linen Layout](src/solutions/year2024/day19.rs) | ⭐⭐ | 2.923 | 22.751 |
3333
| [Day 20: Race Condition](src/solutions/year2024/day20.rs) | ⭐⭐ | 7.355 | 280.627 |
3434
| [Day 21: Keypad Conundrum](src/solutions/year2024/day21.rs) || 0.454 | - |
35+
| [Day 22: Monkey Market](src/solutions/year2024/day22.rs) | - | - | - |
3536

3637
# 2023
3738

src/solutions/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pub fn solution(day: DayNumber, year: Year) -> Box<dyn Solution> {
3434
19 => Box::new(year2024::day19::Day19),
3535
20 => Box::new(year2024::day20::Day20),
3636
21 => Box::new(year2024::day21::Day21),
37+
22 => Box::new(year2024::day22::Day22),
3738
_ => panic!("Day not exist"),
3839
},
3940
Year::Year2023 => match i {

src/solutions/year2024/day22.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 Day22;
4+
5+
impl Solution for Day22 {
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::day22::Day22;
18+
use crate::solutions::Solution;
19+
20+
const EXAMPLE: &str = r#""#;
21+
22+
#[test]
23+
fn part_one_example() {
24+
assert_eq!("0", Day22.part_one(EXAMPLE));
25+
}
26+
}

src/solutions/year2024/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ pub mod day18;
1818
pub mod day19;
1919
pub mod day20;
2020
pub mod day21;
21+
pub mod day22;

0 commit comments

Comments
 (0)