Fix bug in submission
The common words are lowercase and our submit check didn't account for that (because all the morse shorthands are uppercase)
This commit is contained in:
parent
6aa9895174
commit
7214994e33
@ -294,7 +294,7 @@ class ListeningGame {
|
|||||||
} else {
|
} else {
|
||||||
const enteredWord = this.wordInput.value;
|
const enteredWord = this.wordInput.value;
|
||||||
// console.log('enteredWord: ', enteredWord, 'target: ', this.target);
|
// console.log('enteredWord: ', enteredWord, 'target: ', this.target);
|
||||||
if (enteredWord.toUpperCase() == this.target) {
|
if (enteredWord.toUpperCase() == this.target.toUpperCase()) {
|
||||||
// If they got the word, show message and switch event listener.
|
// If they got the word, show message and switch event listener.
|
||||||
this.statusElement.textContent = 'Correct! Press enter to play a new round.';
|
this.statusElement.textContent = 'Correct! Press enter to play a new round.';
|
||||||
this.messageFound = true;
|
this.messageFound = true;
|
||||||
@ -617,7 +617,7 @@ class InputGame {
|
|||||||
// console.log('target: \'' + this.target + '\'');
|
// console.log('target: \'' + this.target + '\'');
|
||||||
// console.log('this.letterStack.join(\'\'): \'' + this.letterStack.join('') + '\'');
|
// console.log('this.letterStack.join(\'\'): \'' + this.letterStack.join('') + '\'');
|
||||||
// console.log(this.letterStack.join('') == this.target);
|
// console.log(this.letterStack.join('') == this.target);
|
||||||
if (this.letterStack.join('') == this.target) {
|
if (this.letterStack.join('').toUpperCase() == this.target.toUpperCase()) {
|
||||||
// console.log('match!');
|
// console.log('match!');
|
||||||
// Clear intervals
|
// Clear intervals
|
||||||
clearTimeout(this.letterTimeout);
|
clearTimeout(this.letterTimeout);
|
||||||
|
Loading…
Reference in New Issue
Block a user