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 8c48466 commit 094dc84Copy full SHA for 094dc84
src/grid/mod.rs
@@ -81,6 +81,11 @@ impl Grid {
81
(0..self.height).contains(&r) && (0..self.width).contains(&c)
82
}
83
84
+ /// Set a grid element by index.
85
+ pub fn set(&mut self, index: usize, val: char) {
86
+ self.grid[index] = val;
87
+ }
88
+
89
/// Find first index of c in the grid
90
pub fn find_char(&self, ch: char) -> Option<usize> {
91
self.grid
0 commit comments