only flash wrong row when word not valid
This commit is contained in:
parent
4405d97daf
commit
faf71e5ed7
6
game.js
6
game.js
@ -43,8 +43,10 @@ function checkGridRow() {
|
|||||||
|
|
||||||
console.log(rowWord)
|
console.log(rowWord)
|
||||||
if (!wordlist.valid_inputs.includes(rowWord)) {
|
if (!wordlist.valid_inputs.includes(rowWord)) {
|
||||||
body.classList.add("incorrect")
|
getGridRow(row).items.forEach(item => {
|
||||||
setTimeout( () => body.classList.remove("incorrect"), 500)
|
item.HTMLItem.classList.add("incorrect")
|
||||||
|
setTimeout( () => item.HTMLItem.classList.remove("incorrect"), 500)
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user