Added property to planets to show if they're habitable.
This commit is contained in:
parent
8e6a790b74
commit
10b9bec576
|
@ -17,6 +17,7 @@ function Planet(name, seed, orbitalRadius, insolation) {
|
||||||
this.hydrographics = this.template.hydrographics(pseudoRandom, this.insolation, this.radius, this.density);
|
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.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);
|
this.HI = this.template.HI(this.insolation, this.radius, this.density, this.hydrographics, this.atmosphere);
|
||||||
|
if (this.HI == 2) this.habitable = true;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue