mirror of
https://github.com/Baipyrus/AoC-23.git
synced 2024-11-14 17:53:49 +00:00
introduce struct to keep track of city blocks
This commit is contained in:
parent
74269c994d
commit
52d5b5949c
@ -8,6 +8,14 @@ pub fn part_one() {
|
||||
let input = setup();
|
||||
}
|
||||
|
||||
fn pathfind(grid: &mut Vec<Vec<Block>>) -> i32 {
|
||||
}
|
||||
|
||||
struct Block {
|
||||
x: usize,
|
||||
y: usize,
|
||||
}
|
||||
|
||||
fn setup() -> Vec<Vec<Block>> {
|
||||
let name = "day17";
|
||||
println!("Executing module '{name}' entrypoint . . . ");
|
||||
@ -17,4 +25,19 @@ fn setup() -> Vec<Vec<Block>> {
|
||||
let input = match_inputs(lines, &r".");
|
||||
|
||||
convert_num(input)
|
||||
.iter()
|
||||
.enumerate()
|
||||
.map(|(j, v)| {
|
||||
v.iter()
|
||||
.enumerate()
|
||||
.map(|(i, n)| Block {
|
||||
x: i,
|
||||
y: j,
|
||||
c: *n,
|
||||
d: 0,
|
||||
h: 0,
|
||||
})
|
||||
.collect()
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user