We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaa553e commit 72ec737Copy full SHA for 72ec737
src/util/grid.rs
@@ -44,6 +44,17 @@ impl Grid<u8> {
44
raw.iter().for_each(|slice| bytes.extend_from_slice(slice));
45
Grid { width, height, bytes }
46
}
47
+
48
+ pub fn print(&self) {
49
+ for y in 0..self.height {
50
+ for x in 0..self.width {
51
+ let point = Point::new(x, y);
52
+ print!("{}", self[point] as char);
53
+ }
54
+ println!();
55
56
57
58
59
60
impl<T: Copy + PartialEq> Grid<T> {
0 commit comments