From 5fc666628d982360afc6ab25fe0f2c36cc13518b Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Fri, 19 Feb 2021 21:43:02 -0500 Subject: Take max iterations into account when skipping generations. --- rules.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rules.mjs b/rules.mjs index f36a956..f9e9e1b 100644 --- a/rules.mjs +++ b/rules.mjs @@ -416,10 +416,11 @@ class Rules { const g = this.currentGenome.clone() this.genomeList.push(g) }) + this.iterations -= n this.currentState = new PerformMutation(this) - this.die.value = 18 - const nucleotide = this.currentGenome.nucleotides[this.die.value-1] + this.die.value = 14 + const nucleotide = this.currentGenome.nucleotides[17] this.currentGenome.selectedNucleotide = nucleotide } @@ -484,7 +485,7 @@ class Rules { this.enterState() } } -Rules.maxIterations = 3 +Rules.maxIterations = 10 Rules.initialGenomeBases = [ 'G', 'C', 'A', 'C', 'T', 'C', -- cgit v1.2.3