Ver código fonte

added failing case

Johann Woelper 8 anos atrás
pai
commit
61c912ddcf
1 arquivos alterados com 7 adições e 1 exclusões
  1. 7 1
      server/src/main.rs

+ 7 - 1
server/src/main.rs

@@ -95,6 +95,12 @@ impl Biome {
                 lifeform.mass = 0.0;
             }
 
+            //lifeform.tick(self);
+            /*
+            if i could do this, i could handle most of the logic in Lifeform which I
+            would prefer, but "cannot borrow `*self` as mutable more than once at a time"
+            */
+
     }
     
     }
@@ -125,7 +131,7 @@ impl Lifeform {
     i would like to be able to pass the biome to the lifeform as a reference to that
     it could interact with it.
     */
-    fn tick(&mut self){
+    fn tick(&mut self, biome: &mut Biome){
 
     }
 }