(guess, tiles)
| 15456 | } |
| 15457 | |
| 15458 | function checkWinLose(guess, tiles) { |
| 15459 | if (guess === targetWord) { |
| 15460 | showAlert("You Win", 5000) |
| 15461 | danceTiles(tiles) |
| 15462 | stopInteraction() |
| 15463 | return |
| 15464 | } |
| 15465 | |
| 15466 | const remainingTiles = guessGrid.querySelectorAll(":not([data-letter])") |
| 15467 | if (remainingTiles.length === 0) { |
| 15468 | showAlert(targetWord.toUpperCase(), null) |
| 15469 | stopInteraction() |
| 15470 | } |
| 15471 | } |
| 15472 | |
| 15473 | function danceTiles(tiles) { |
| 15474 | tiles.forEach((tile, index) => { |
no test coverage detected