Browse Source

cell struct

Johann Woelper 6 years ago
parent
commit
0f326feac4
1 changed files with 12 additions and 1 deletions
  1. 12 1
      src/main.rs

+ 12 - 1
src/main.rs

@@ -5,6 +5,17 @@ extern crate vecmath;
 use piston_window::*;
 use vecmath::*;
 
+struct Board {
+    x: Vec<Option<Cell>>,
+    y: Vec<Option<Cell>>,
+}
+
+struct Cell {
+    age: u8,
+
+}
+
+
 fn main() {
     let opengl = OpenGL::V3_2;
     let (width, height) = (300, 300);
@@ -33,7 +44,7 @@ fn main() {
         canvas.put_pixel(step, step, im::Rgba([0, 0, 0, 255]));
 
         step += 1;
-        
+
         texture.update(&mut texture_context, &canvas).unwrap();
         window.draw_2d(&e, |c, g, device| {
             texture_context.encoder.flush(device);