flash screen red when user enters a word not in wordlist or not enough letters
This commit is contained in:
parent
38d0ec2017
commit
3a2b633022
6
game.js
6
game.js
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user