MCPcopy Index your code
hub / github.com/WebDevSimplified/wordle-clone / checkWinLose

Function checkWinLose

script.js:15458–15471  ·  view source on GitHub ↗
(guess, tiles)

Source from the content-addressed store, hash-verified

15456}
15457
15458function 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
15473function danceTiles(tiles) {
15474 tiles.forEach((tile, index) => {

Callers 1

flipTileFunction · 0.85

Calls 3

showAlertFunction · 0.85
danceTilesFunction · 0.85
stopInteractionFunction · 0.85

Tested by

no test coverage detected