From: Grégory Burri Date: Mon, 16 Dec 2019 15:30:06 +0000 (+0100) Subject: Beginning of day 15 X-Git-Url: https://git.euphorik.ch/?a=commitdiff_plain;h=3674300d1e53e4fc4a0c85a66b10d669dbe1241d;p=advent_of_code_2019.git Beginning of day 15 --- diff --git a/src/day15.rs b/src/day15.rs new file mode 100644 index 0000000..8e59e65 --- /dev/null +++ b/src/day15.rs @@ -0,0 +1,30 @@ +use super::intcode; + +struct RepairDroid { +} + +impl intcode::IO for RepairDroid { + // May block. + fn read(&mut self) -> i64 { + 1 + } + + // Send to the output channel. + fn write(&mut self, value: i64) { + } +} + +pub fn shorted_path_to_oxygen(code: &[i64]) -> i32 { + 0 +} + + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn part1_sample_1() { + + } +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 3201738..f1cb88d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ mod day11; mod day12; mod day13; mod day14; +mod day15; fn day01() -> String { let masses = common::read_list_of_numbers("data/day01.input", "\n"); @@ -110,6 +111,11 @@ fn day14() -> String { format!("part1: {}, part2: {}", ore_per_fuel, day14::fuel_produced(&reactions, 1_000_000_000_000, ore_per_fuel)) } +fn day15() -> String { + //let code = common::read_list_of_numbers("data/day15.input", ","); + format!("part1: {}, part2: {}", "", "") +} + fn format_micros(t: u128) -> String { if t < 10_000 { format!("{} μs", t) @@ -143,6 +149,7 @@ fn main() { day12, day13, day14, + day15, ); let args: Vec = env::args().skip(1).collect();