X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Futils%2FsquareId.js;h=6469bc3f86f50b4de5a1ce6759804485a35070e7;hp=a68b51f9e6d002f5963253768b3741160e6a6c6b;hb=dac395887d96e2d642b209c6db6aaacc3ffacb34;hpb=5fde3a01497262862afc4cb4c9457d4e0ad69a4a diff --git a/client/src/utils/squareId.js b/client/src/utils/squareId.js index a68b51f9..6469bc3f 100644 --- a/client/src/utils/squareId.js +++ b/client/src/utils/squareId.js @@ -1,13 +1,13 @@ // Get the identifier of a HTML square from its numeric coordinates o.x,o.y. export function getSquareId(o) { - // NOTE: a separator is required to allow any size of board - return "sq-" + o.x + "-" + o.y; + // NOTE: a separator is required to allow any size of board + return "sq-" + o.x + "-" + o.y; } // Inverse function export function getSquareFromId(id) { - const idParts = id.split('-'); - return [parseInt(idParts[1]), parseInt(idParts[2])]; + const idParts = id.split('-'); + return [parseInt(idParts[1]), parseInt(idParts[2])]; }