|
|
|
@ -46,7 +46,16 @@
|
|
|
|
|
resultDisplay.appendChild(linkCell);
|
|
|
|
|
|
|
|
|
|
let guesses = document.getElementById('guesses');
|
|
|
|
|
if (results.length > 0) resultDisplay.classList.add('solved');
|
|
|
|
|
if (results.length > 0) {
|
|
|
|
|
resultDisplay.classList.add('solved');
|
|
|
|
|
document.getElementById('clues_solved').innerText++;
|
|
|
|
|
} else if (this.game.allTopWords.has(guess)) {
|
|
|
|
|
resultDisplay.classList.add('top_word');
|
|
|
|
|
document.getElementById('top_words_found').innerText++;
|
|
|
|
|
} else {
|
|
|
|
|
resultDisplay.classList.add('bonus');
|
|
|
|
|
document.getElementById('bonus_words_found').innerText++;
|
|
|
|
|
}
|
|
|
|
|
guesses.prepend(resultDisplay);
|
|
|
|
|
|
|
|
|
|
this.clearUnlocked();
|
|
|
|
@ -262,6 +271,9 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
document.getElementById('clues_total').innerText = game.clues.length;
|
|
|
|
|
document.getElementById('top_words_total').innerText = game.allTopWords.size - game.clues.length;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -368,7 +380,14 @@
|
|
|
|
|
<button id="shuffle"></button>
|
|
|
|
|
<div id="available_letters"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<table id="guesses">
|
|
|
|
|
</table>
|
|
|
|
|
<div id="guess_list">
|
|
|
|
|
<div id="guess_counts">
|
|
|
|
|
<span class="solved">Clues: <span id="clues_solved">0</span>/<span id="clues_total">?</span></span>,
|
|
|
|
|
<span class="top_word">Other common words: <span id="top_words_found">0</span>/<span id="top_words_total">?</span></span>,
|
|
|
|
|
<span class="bonus">Bonus words: <span id="bonus_words_found">0</span></span>
|
|
|
|
|
</div>
|
|
|
|
|
<table id="guesses">
|
|
|
|
|
</table>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|