diff --git a/tutorial/wasm-game-of-life/src/lib.rs b/tutorial/wasm-game-of-life/src/lib.rs index 2fe1e8c..d5c453c 100644 --- a/tutorial/wasm-game-of-life/src/lib.rs +++ b/tutorial/wasm-game-of-life/src/lib.rs @@ -43,6 +43,18 @@ impl Universe { } } + pub fn width(&self) -> u32 { + self.width + } + + pub fn height(&self) -> u32 { + self.height + } + + pub fn cells(&self) -> *const Cell { + self.cells.as_ptr() + } + pub fn render(&self) -> String { self.to_string() } diff --git a/tutorial/wasm-game-of-life/www/index.html b/tutorial/wasm-game-of-life/www/index.html index 0d09239..ec89e14 100644 --- a/tutorial/wasm-game-of-life/www/index.html +++ b/tutorial/wasm-game-of-life/www/index.html @@ -18,7 +18,7 @@
- +