Created
December 11, 2018 16:01
-
-
Save alicethewhale/a15b6bf7a1d44bf49c83258a1cfaf3cc to your computer and use it in GitHub Desktop.
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
tiles.map(tile => { | |
tile.addEventListener("click", event => { | |
const tileArea = tile.style.getPropertyValue("--area"); | |
const emptyTileArea = emptyTile.style.getPropertyValue("--area"); | |
emptyTile.style.setProperty("--area", tileArea); | |
tile.style.setProperty("--area", emptyTileArea); | |
forceGridAnimation(); | |
unlockTiles(tileArea); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment