From 10b9bec5762903967cf07a55fc4aee493a830593 Mon Sep 17 00:00:00 2001 From: Bram van der Veen <96aa48@gmail.com> Date: Thu, 30 Jun 2016 10:44:57 +0200 Subject: [PATCH] Added property to planets to show if they're habitable. --- planet.js | 1 + 1 file changed, 1 insertion(+) diff --git a/planet.js b/planet.js index 4103022..0ee05d4 100644 --- a/planet.js +++ b/planet.js @@ -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; }