editor stuff

This commit is contained in:
Crispy 2024-05-01 16:42:43 +02:00
parent 365035a64d
commit f71502f32a
2 changed files with 46 additions and 29 deletions

View file

@ -180,6 +180,12 @@ impl RulePattern {
}
}
pub fn set(&mut self, x: usize, y: usize, cell: Option<Cell>) {
if x < self.width && y < self.height {
self.contents[x + self.width * y] = cell
}
}
pub fn height(&self) -> usize {
self.height
}