X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=app.js;h=a6ee234aed96c204a2d7dd1ba63a46b5a1fdaa5b;hb=e5f9342704d2a453c3cd2f84e31b1ea384b2d03d;hp=7f8dc274cf28376ebd9ece4b542aee6837d3b666;hpb=f46a68b8ed74b54b6a26645b88d2a4ae48c1227a;p=xogo.git diff --git a/app.js b/app.js index 7f8dc27..a6ee234 100644 --- a/app.js +++ b/app.js @@ -103,6 +103,7 @@ function showNewGameForm() { toggleVisible("newGameForm"); import(`/variants/${vname}/class.js`).then(module => { window.V = module.default; + V.Aliases.forEach(e => window[e.key] = e.val); prepareOptions(); }); } @@ -206,6 +207,7 @@ function fillGameInfos(gameInfos, oppIndex) { for (let j=i; j { } }; // Pack into one moves array, then send - curMoves.push({ - appear: move.appear, - vanish: move.vanish, - start: move.start, - end: move.end - }); + curMoves.push(move); if (vr.turn != playerColor) { toggleTurnIndicator(false); send("newmove", @@ -451,6 +448,7 @@ function initializeGame(obj) { const options = obj.options || {}; import(`/variants/${obj.vname}/class.js`).then(module => { window.V = module.default; + V.Aliases.forEach(e => window[e.key] = e.val); // Load CSS. Avoid loading twice the same stylesheet: const allIds = [].slice.call($.styleSheets).map(s => s.id); const newId = obj.vname + "_css";