diff --git a/css/style.css b/css/style.css index 7002034..d8bdf10 100644 --- a/css/style.css +++ b/css/style.css @@ -97,6 +97,10 @@ body { color: white; } +.rect.fail { + color: #bbb; +} + .rect.success { background-color: #08a045; color: white; diff --git a/js/wordmasters.js b/js/wordmasters.js index 8e00427..f5193fd 100644 --- a/js/wordmasters.js +++ b/js/wordmasters.js @@ -93,12 +93,14 @@ const wordmasters = { } } - // Correct letter, wrong place + // Correct letter, wrong place or wrong letter for (let i = 0; i < wordLen; i++) { if (theWord[i] === theGuess[i]) continue; // Already marked if (theWord.includes(theGuess[i]) && letterFreqs[theGuess[i]] > 0) { this.board[this.currRow][i].classList.add('warning'); letterFreqs[theGuess[i]]--; + } else { + this.board[this.currRow][i].classList.add('fail'); } }