From 27d98187a8d7288e0c9d65c09fd6737900cc9883 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sat, 6 Feb 2021 11:19:50 -0500 Subject: Change 'translation' to 'transition'. --- genome-list.mjs | 1 - nucleotide.mjs | 4 ++-- rules.mjs | 10 +++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/genome-list.mjs b/genome-list.mjs index 0008ce8..8969a8c 100644 --- a/genome-list.mjs +++ b/genome-list.mjs @@ -8,7 +8,6 @@ class GenomeList { this.genomes.push(genome) this.elt.appendChild(genome.elt) window.genome = genome - console.log('scrolling into vuew', genome.elt) genome.elt.scrollIntoView(false) } diff --git a/nucleotide.mjs b/nucleotide.mjs index d599fe1..e646efc 100644 --- a/nucleotide.mjs +++ b/nucleotide.mjs @@ -61,7 +61,7 @@ class Nucleotide { this.onClick(this) } } -Nucleotide.translation = {'A': 'G', +Nucleotide.transition = {'A': 'G', 'C': 'T', 'G': 'A', 'T': 'C'} @@ -73,7 +73,7 @@ Nucleotide.defaultTransversion = {'A': 'C', 'C': 'A', 'G': 'T', 'T': 'G'} -Nucleotide.bases = Object.keys(Nucleotide.translation) +Nucleotide.bases = Object.keys(Nucleotide.transition) export default Nucleotide diff --git a/rules.mjs b/rules.mjs index cc1363b..3658393 100644 --- a/rules.mjs +++ b/rules.mjs @@ -146,7 +146,7 @@ class PerformMutation { get expectedMutation() { if (this.rules.die.value <= 14) { - return Nucleotide.translation + return Nucleotide.transition } else if (this.rules.die.value <= 17) { return Nucleotide.complementingTransversion } else { @@ -158,8 +158,8 @@ class PerformMutation { return this.rules.currentGenome.selectedNucleotide } - get errorTranslationHTML() { - return `Select the base that corresponds to a translation of ${this.selectedNucleotide.value}.` + get errorTransitionHTML() { + return `Select the base that corresponds to a transition of ${this.selectedNucleotide.value}.` } get errorComplementingTransversionHTML() { return `Select the base that corresponds to a complementing transversion of ${this.selectedNucleotide.value}.` @@ -169,8 +169,8 @@ class PerformMutation { } get errorHTML() { - if (this.expectedMutation == Nucleotide.translation) { - return this.errorTranslationHTML + if (this.expectedMutation == Nucleotide.transition) { + return this.errorTransitionHTML } else if (this.expectedMutation == Nucleotide.complementingTransversion) { return this.errorComplementingTransversionHTML } else { -- cgit v1.2.3