From cfca463cdb3db8e506b568025933f0f30cc2be5b Mon Sep 17 00:00:00 2001 From: unintendedfraud Date: Sat, 30 Dec 2023 17:38:30 +0100 Subject: [PATCH] z --- day12/Cargo.toml | 9 +++++++++ day12/data.txt | 6 ++++++ day12/src/main.rs | 18 ++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 day12/Cargo.toml create mode 100644 day12/data.txt create mode 100644 day12/src/main.rs diff --git a/day12/Cargo.toml b/day12/Cargo.toml new file mode 100644 index 0000000..2f06cbe --- /dev/null +++ b/day12/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "day12" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +util = { path = "../util" } diff --git a/day12/data.txt b/day12/data.txt new file mode 100644 index 0000000..e925935 --- /dev/null +++ b/day12/data.txt @@ -0,0 +1,6 @@ +???.### 1,1,3 +.??..??...?##. 1,1,3 +?#?#?#?#?#?#?#? 1,3,1,6 +????.#...#... 4,1,1 +????.######..#####. 1,6,5 +?###???????? 3,2,1 diff --git a/day12/src/main.rs b/day12/src/main.rs new file mode 100644 index 0000000..c4f251c --- /dev/null +++ b/day12/src/main.rs @@ -0,0 +1,18 @@ +struct Line { + conditions: Vec, + record: Vec, +} + +fn main() { + let data = get_formatted_data(&util::get_data("data.txt")); +} + +fn get_formatted_data(data: &Vec) -> Vec { + let v = Vec::new(); + + for i in 0..data.len() { + let line = data[i]; + } + + return v; +}