Skip to content

Commit

Permalink
Solution 1 done
Browse files Browse the repository at this point in the history
  • Loading branch information
madser123 committed Jul 17, 2024
1 parent 0500fb2 commit 92d112e
Show file tree
Hide file tree
Showing 6 changed files with 444 additions and 1 deletion.
5 changes: 5 additions & 0 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 bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ almanac = { path = "../lib/almanac" }
boat_race = { path = "../lib/boat_race" }
camel_cards = { path = "../lib/camel_cards" }
network_nodes = { path = "../lib/network_nodes" }
oasis = { path = "../lib/oasis" }
oasis = { path = "../lib/oasis" }
pipe_maze = { path = "../lib/pipe_maze" }
9 changes: 9 additions & 0 deletions bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use cube_game::{cube::Color, Cubes, Game};
use gondola_lift::EngineSchematic;
use network_nodes::{Network, Node};
use oasis::Report;
use pipe_maze::Maze;
use scratchcard::ScratchCards;
use trebuchet::Trebuchet;

Expand Down Expand Up @@ -117,6 +118,13 @@ fn day9(input: String) {
println!("Sum of prev values for histories: {prev_sum}")
}

fn day10(input: String) {
let maze = Maze::from_str(&input).expect("Failed parsing maze");
let farthest_point = maze.find_longest_distance_from_start();

println!("Farthest point from start: {farthest_point}");
}

fn main() {
println!("## Advent of Code 2023 solutions ##");
time!("All", {
Expand All @@ -129,5 +137,6 @@ fn main() {
day!(7, day7);
day!(8, day8);
day!(9, day9);
day!(10, day10);
})
}
Loading

0 comments on commit 92d112e

Please sign in to comment.