-
-
Save goodfoo/b4a5995f2517344ccc16585a4297ec7c to your computer and use it in GitHub Desktop.
A small devtools sketch for reflecting the Daily Wordle grid as a group of emojis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tiles = [] | |
document.querySelector("game-app").$board.querySelectorAll("game-row").forEach(row => { | |
let rowTiles = []; | |
row.$tiles.forEach(tile => rowTiles.push(tile._state)); | |
tiles.push(rowTiles) | |
}) | |
for (let row of tiles) { | |
let rowString = "" | |
for (let tile of row) { | |
switch (tile) { | |
case 'absent': | |
rowString += '⬛️ ' | |
break | |
case 'present': | |
rowString += '🟨 ' | |
break | |
case 'correct': | |
rowString += '🟩 ' | |
break | |
default: | |
// This will just print nothing for empty tiles | |
break | |
} | |
} | |
if (rowString) { | |
console.log(rowString) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment