Day 14, puzzle 1

This commit is contained in:
jazzpi
2022-12-16 09:46:19 +01:00
parent 6d3686c946
commit 215e067d33
4 changed files with 141 additions and 0 deletions

17
src/bin/d14p1.rs Normal file
View File

@ -0,0 +1,17 @@
use aoc22::{day14, util};
pub fn main() {
let mut cave = day14::parse_cave(&util::parse_input());
println!("Initial cave:");
cave.print();
let mut sand = 0;
while cave.drop_sand() {
sand += 1;
}
println!("Final cave:");
cave.print();
println!("Total sand dropped: {}", sand);
}