summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--genome.mjs8
-rw-r--r--rules.mjs2
2 files changed, 1 insertions, 9 deletions
diff --git a/genome.mjs b/genome.mjs
index ed69dbf..581e9a8 100644
--- a/genome.mjs
+++ b/genome.mjs
@@ -3,12 +3,6 @@ import Die from './die.mjs'
import { randomItem } from './utils.mjs'
class Genome {
- static *randomBase() {
- for (const i of [...Array(Genome.size)]) {
- yield randomItem(Nucleotide.bases)
- }
- }
-
constructor(nucleotides) {
const codonList = document.createElement('ol')
this._boundNucleotideClickedHandler =
@@ -81,7 +75,5 @@ class Genome {
this.selectedNucleotide = nucleotide
}
}
-// Size of the genome in codons.
-Genome.size = 6
export default Genome
diff --git a/rules.mjs b/rules.mjs
index d397bf0..176035a 100644
--- a/rules.mjs
+++ b/rules.mjs
@@ -52,7 +52,7 @@ class RollForNucleotide {
}
handleDieRoll() {
- if (this.rules.die.value > Genome.size) {
+ if (this.rules.die.value > Rules.initialGenomeBases) {
this.rules.iterations--
if (this.rules.isLastIteration) {
this.rules.next(new DoNothing(this.rules))