flash screen red when user enters a word not in wordlist or not enough letters

This commit is contained in:
Akbar Rahman 2022-01-27 20:18:29 +00:00
parent 38d0ec2017
commit 3a2b633022
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

View File

@ -32,7 +32,11 @@ function checkGridRow() {
getGridRow(row).items.forEach(item => rowWord += item.letter)
console.log(rowWord)
if (!wordlist.includes(rowWord)) return
if (!wordlist.includes(rowWord)) {
body.classList.add("incorrect")
setTimeout( () => body.classList.remove("incorrect"), 500)
return
}
var correct_letters = 0
var dedupword = word