(&mut self)
| 38 | } |
| 39 | |
| 40 | pub fn clear(&mut self) { |
| 41 | self.cells = vec![ |
| 42 | ConsoleCell { |
| 43 | glyph: ' ', |
| 44 | foreground: Color::rgb(1.0, 1.0, 1.0), |
| 45 | background: Color::rgb(0.0, 0.0, 0.0), |
| 46 | }; |
| 47 | self.width * self.height |
| 48 | ]; |
| 49 | } |
| 50 | |
| 51 | pub fn set_char(&mut self, x: usize, y: usize, glyph: char) { |
| 52 | self.cells[x + y * self.width].glyph = glyph; |