Skip to content

Commit c205f8a

Browse files
committed
2023 day 10.
1 parent e9fc37f commit c205f8a

File tree

19 files changed

+601
-5
lines changed

19 files changed

+601
-5
lines changed

2023/10/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/target

2023/10/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "y2023d10"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
anyhow = "1.0.99"
8+
game-grid.workspace = true
9+
thiserror = "2.0.15"
10+
direction.workspace = true

2023/10/data/example1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.....
2+
.S-7.
3+
.|.|.
4+
.L-J.
5+
.....

2023/10/data/example2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
..F7.
2+
.FJ|.
3+
SJ.L7
4+
|F--J
5+
LJ...

2023/10/data/example3

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
...........
2+
.S-------7.
3+
.|F-----7|.
4+
.||.....||.
5+
.||.....||.
6+
.|L-7.F-J|.
7+
.|..|.|..|.
8+
.L--J.L--J.
9+
...........

2023/10/data/example4

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.F----7F7F7F7F-7....
2+
.|F--7||||||||FJ....
3+
.||.FJ||||||||L7....
4+
FJL7L7LJLJ||LJ.L-7..
5+
L--J.L7...LJS7F-7L7.
6+
....F-J..F7FJ|L7L7L7
7+
....L7.F7||L7|.L7L7|
8+
.....|FJLJ|FJ|F7|.LJ
9+
....FJL-7.||.||||...
10+
....L---J.LJ.LJLJ...

2023/10/data/example5

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FF7FSF7F7F7F7F7F---7
2+
L|LJ||||||||||||F--J
3+
FL-7LJLJ||||||LJL-77
4+
F--JF--7||LJLJ7F7FJ-
5+
L---JF-JLJ.||-FJLJJ7
6+
|F|F-JF---7F7-L7L|7|
7+
|FFJF7L7F-JF7|JL---7
8+
7-L-JL7||F7|L7F-7F7|
9+
L.L7LFJ|||||FJL7||LJ
10+
L7JLJL-JLJLJL--JLJ.L

2023/10/data/input

Lines changed: 140 additions & 0 deletions
Large diffs are not rendered by default.

2023/10/src/data.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#[cfg(test)]
2+
pub const EXAMPLE1: &'static str = include_str!("../data/example1");
3+
4+
#[cfg(test)]
5+
pub const EXAMPLE2: &'static str = include_str!("../data/example2");
6+
7+
#[cfg(test)]
8+
pub const EXAMPLE3: &'static str = include_str!("../data/example3");
9+
10+
#[cfg(test)]
11+
pub const EXAMPLE4: &'static str = include_str!("../data/example4");
12+
13+
#[cfg(test)]
14+
pub const EXAMPLE5: &'static str = include_str!("../data/example5");
15+
16+
#[allow(unused)]
17+
pub const INPUT: &'static str = include_str!("../data/input");

2023/10/src/main.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
mod data;
2+
mod part1;
3+
mod part2;
4+
mod pipe;
5+
mod position;
6+
mod puzzle;
7+
8+
fn main() {
9+
use data::INPUT;
10+
println!("Part 1: {}", part1::run(INPUT));
11+
println!("Part 2: {}", part2::run(INPUT));
12+
}

0 commit comments

Comments
 (0)