Added property to planets to show if they're habitable.

This commit is contained in:
Bram van der Veen 2016-06-30 10:44:57 +02:00
parent 8e6a790b74
commit 10b9bec576

View file

@ -17,6 +17,7 @@ function Planet(name, seed, orbitalRadius, insolation) {
this.hydrographics = this.template.hydrographics(pseudoRandom, this.insolation, this.radius, this.density);
this.atmosphere = this.template.atmosphere(pseudoRandom, this.insolation, this.radius, this.density, this.hydrographics);
this.HI = this.template.HI(this.insolation, this.radius, this.density, this.hydrographics, this.atmosphere);
if (this.HI == 2) this.habitable = true;
return this;
}