diff --git a/src/Stats/FossilRecord.js b/src/Stats/FossilRecord.js index 16e58dd..c33b822 100644 --- a/src/Stats/FossilRecord.js +++ b/src/Stats/FossilRecord.js @@ -41,7 +41,9 @@ const FossilRecord = { if (species.cumulative_pop < this.min_pop) { return false; } - this.extinct_species.push(s); + // disabled for now, causes memory problems on long runs + // this.extinct_species.push(s); + // console.log("Extant species:", this.extant_species.length) // console.log("Extinct species:", this.extinct_species.length) return true; diff --git a/src/Stats/Species.js b/src/Stats/Species.js index 37daadd..f251844 100644 --- a/src/Stats/Species.js +++ b/src/Stats/Species.js @@ -3,17 +3,11 @@ const CellStates = require("../Organism/Cell/CellStates"); class Species { constructor(anatomy, ancestor, start_tick) { this.anatomy = anatomy; - this.ancestor = ancestor; + // this.ancestor = ancestor; // garbage collect ancestors to avoid memory problems this.population = 1; this.cumulative_pop = 1; this.start_tick = start_tick; this.end_tick = -1; - this.color = Math.floor(Math.random()*16777215).toString(16); - if (ancestor != null) { - // needs to be reworked, maybe removed - var mutator = Math.floor(Math.random()*16777215)-8000000; - this.color = (mutator + parseInt(ancestor.color, 16)).toString(16); - } this.name = '_' + Math.random().toString(36).substr(2, 9); this.extinct = false; this.calcAnatomyDetails();