1
0

day 15 part 2

This commit is contained in:
2024-12-15 13:20:15 +01:00
parent 24386b750b
commit c1abd8d8f8
2 changed files with 142 additions and 5 deletions

View File

@@ -130,6 +130,15 @@ impl Grid<char> {
content,
}
}
pub fn print(&self) {
for line in &self.content.iter().chunks(self.content_width as usize) {
for c in line.into_iter() {
print!("{c}");
}
println!();
}
}
}
impl<T> Index<Coord> for Grid<T> {