Skip to content

Commit

Permalink
aoc 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Nov 26, 2023
1 parent 2700cca commit 29014b6
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 122 deletions.
7 changes: 3 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ name = "advent_of_code"
version = "0.1.0"

[workspace]
members = ["aoc_lib", "aoc_2021", "aoc_2022", "common"]
members = ["common", "aoc_2021", "aoc_2022", "aoc_2023"]

[dependencies]
common = { path = "common" }
aoc_2021 = { path = "aoc_2021" }
aoc_2022 = { path = "aoc_2022" }
aoc_2023 = { path = "aoc_2023" }

clap = { version = "4.0.29", features = ["derive"] }
72 changes: 38 additions & 34 deletions README.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions aoc_2023/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "aoc_2023"
version = "0.1.0"
edition = "2021"

[dependencies]
common = { path = "../common" }
Empty file added aoc_2023/src/aoc_lib/mod.rs
Empty file.
19 changes: 19 additions & 0 deletions aoc_2023/src/day_01.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use common::{load, Solution};

pub struct Day01;

impl Solution for Day01 {
fn name(&self) -> &'static str {
""
}

fn part_a(&self) -> String {
let raw = load(2023, 1);
todo!()
}

fn part_b(&self) -> String {
let raw = load(2023, 1);
todo!()
}
}
6 changes: 6 additions & 0 deletions aoc_2023/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use common::Solution;

mod aoc_lib;
mod day_01;

pub const ALL: [&dyn Solution; 1] = [&day_01::Day01];
9 changes: 0 additions & 9 deletions aoc_lib/Cargo.toml

This file was deleted.

5 changes: 0 additions & 5 deletions aoc_lib/src/lib.rs

This file was deleted.

10 changes: 0 additions & 10 deletions aoc_lib/src/line.rs

This file was deleted.

58 changes: 0 additions & 58 deletions aoc_lib/src/matrix.rs

This file was deleted.

3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use clap::Parser;
use common::Solution;
mod args;

const DEFAULT_YEAR: u32 = 2022;
const DEFAULT_YEAR: u32 = 2023;

fn main() {
let args = Args::parse();
Expand Down Expand Up @@ -61,6 +61,7 @@ fn get_year(year: u32) -> &'static [&'static dyn Solution] {
match year {
2021 => &aoc_2021::ALL,
2022 => &aoc_2022::ALL,
2023 => &aoc_2023::ALL,
_ => &[],
}
}
Expand Down

0 comments on commit 29014b6

Please sign in to comment.