Skip to content

Commit

Permalink
chore(22/2024): add day boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
manhunto committed Dec 27, 2024
1 parent 00c13a9 commit bf1694b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
| [Day 19: Linen Layout](src/solutions/year2024/day19.rs) | ⭐⭐ | 2.923 | 22.751 |
| [Day 20: Race Condition](src/solutions/year2024/day20.rs) | ⭐⭐ | 7.355 | 280.627 |
| [Day 21: Keypad Conundrum](src/solutions/year2024/day21.rs) || 0.454 | - |
| [Day 22: Monkey Market](src/solutions/year2024/day22.rs) | - | - | - |

# 2023

Expand Down
1 change: 1 addition & 0 deletions src/solutions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub fn solution(day: DayNumber, year: Year) -> Box<dyn Solution> {
19 => Box::new(year2024::day19::Day19),
20 => Box::new(year2024::day20::Day20),
21 => Box::new(year2024::day21::Day21),
22 => Box::new(year2024::day22::Day22),
_ => panic!("Day not exist"),
},
Year::Year2023 => match i {
Expand Down
26 changes: 26 additions & 0 deletions src/solutions/year2024/day22.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use crate::solutions::Solution;

pub struct Day22;

impl Solution for Day22 {
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::day22::Day22;
use crate::solutions::Solution;

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

#[test]
fn part_one_example() {
assert_eq!("0", Day22.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 @@ -18,3 +18,4 @@ pub mod day18;
pub mod day19;
pub mod day20;
pub mod day21;
pub mod day22;

0 comments on commit bf1694b

Please sign in to comment.