script.js
// Converts HTML ID to JavaScript Object for Tile Position
Converts HTML ID to JavaScript Object for Tile Position
Converts HTML ID to JavaScript Object for Tile Position
function tileJSPosition(tile) {
    const splitTile = tile.split(" ");
    return {
        x: parseInt(
            splitTile[0].split("").slice(1, splitTile[0].split("").length).join("")
        ),
        y: parseInt(
            splitTile[1].split("").slice(1, splitTile[1].split("").length).join("")
        ),
    };
}
function tileJSPosition ( tile ) { const splitTile = tile . split ( " " ) ; return { x : parseInt ( splitTile [ 0 ] . split ( "" ) . slice ( 1 , splitTile [ 0 ] . split ( "" ) . length ) . join ( "" ) ) , y : parseInt ( splitTile [ 1 ] . split ( "" ) . slice ( 1 , splitTile [ 1 ] . split ( "" ) . length ) . join ( "" ) ) , } ; }
Converts HTML ID to JavaScript Object for Tile Position
Converts HTML ID to JavaScript Object for Tile Position