diff --git a/src/Game.vue b/src/Game.vue index 77f4125..e4f051c 100644 --- a/src/Game.vue +++ b/src/Game.vue @@ -109,22 +109,28 @@ function completeRow() { } }) + allowInput = false if (currentRow.every((tile) => tile.state === LetterState.CORRECT)) { // yay! - allowInput = false - showMessage( - ['Genius', 'Magnificent', 'Impressive', 'Splendid', 'Great', 'Phew'][ - currentRowIndex - ], - 2000 - ) + setTimeout(() => { + showMessage( + ['Genius', 'Magnificent', 'Impressive', 'Splendid', 'Great', 'Phew'][ + currentRowIndex + ], + 2000 + ) + }, 1600) } else if (currentRowIndex < board.length - 1) { // go the next row currentRowIndex++ + setTimeout(() => { + allowInput = true + }, 1600) } else { // game over :( - allowInput = false - showMessage(answer.toUpperCase(), -1) + setTimeout(() => { + showMessage(answer.toUpperCase(), -1) + }, 1600) } } else { shake() @@ -176,12 +182,12 @@ function shake() { tile.state && 'revealed' ]" > -