summaryrefslogtreecommitdiff
path: root/2018/src/main.rs
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2018-12-15 19:38:16 +0100
committertomsmeding <tom.smeding@gmail.com>2018-12-15 19:38:16 +0100
commitca19e1d4aac6d2da8dae9b60f5b13962b7aff0b8 (patch)
treecbca4dbdef1e8e9b3421852d0de22fa91fdcf5dd /2018/src/main.rs
parentec513223d8106a94def24bd73960c2ebde6194bc (diff)
Day 15
God dammit this one wasn't fun. The amount of edge cases and arbitrary rules made this more of a chore than a puzzle. The code could probably be shorter, but any sane amount of code structure and clarity demanded this size.
Diffstat (limited to '2018/src/main.rs')
-rw-r--r--2018/src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/2018/src/main.rs b/2018/src/main.rs
index 3e44615..6154c99 100644
--- a/2018/src/main.rs
+++ b/2018/src/main.rs
@@ -4,6 +4,7 @@ use std::fs::File;
use std::process::exit;
use argparse::{ArgumentParser, StoreTrue, Store};
+mod benchmark;
mod day1;
mod day2;
mod day3;
@@ -18,9 +19,9 @@ mod day11;
mod day12;
mod day13;
mod day14;
-mod benchmark;
+mod day15;
-static NUM_DAYS: i32 = 14;
+static NUM_DAYS: i32 = 15;
fn day_switch<T: BufRead>(day: i32, reader: T) -> io::Result<(String, String)> {
match day {
@@ -38,6 +39,7 @@ fn day_switch<T: BufRead>(day: i32, reader: T) -> io::Result<(String, String)> {
12 => day12::main(reader),
13 => day13::main(reader),
14 => day14::main(reader),
+ 15 => day15::main(reader),
_ => Err(Error::new(ErrorKind::Other, "Invalid day"))
}
}