diff --git a/src/Organism/Organism.js b/src/Organism/Organism.js index 80f8404..a92d988 100644 --- a/src/Organism/Organism.js +++ b/src/Organism/Organism.js @@ -274,6 +274,8 @@ class Organism { } update() { + if(this.lifetime<0) this.lifetime = 0; + if(this.damage<0) this.damage = 0; this.lifetime++; if (this.lifetime > this.lifespan()) { this.die();