Use canvas and memory
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@@ -111,6 +111,18 @@ impl Universe {
|
||||
pub fn render(&self) -> String {
|
||||
self.to_string()
|
||||
}
|
||||
|
||||
pub fn width(&self) -> u32 {
|
||||
self.width
|
||||
}
|
||||
|
||||
pub fn height(&self) -> u32 {
|
||||
self.height
|
||||
}
|
||||
|
||||
pub fn cells(&self) -> *const Cell {
|
||||
self.cells.as_ptr()
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Universe {
|
||||
|
||||
Reference in New Issue
Block a user