X-Git-Url: https://git.auder.net/images/pieces/%22%20%20V.getPpath%28board%5Bi%5D%5Bj%5D%29%20%20%20%22.svg?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FComputerGame.vue;h=b20b8fe14fb05f39bf5d8344118ad14cb13e353c;hb=7dc18cbeaba1419709afde850ac44ecc1e0c89ec;hp=a4a53f65ff34d44151f15d5fe2f49d9a4ba9fdff;hpb=0e16cb26f6380f57f1079ece9bdb654243073bde;p=vchess.git diff --git a/client/src/components/ComputerGame.vue b/client/src/components/ComputerGame.vue index a4a53f65..b20b8fe1 100644 --- a/client/src/components/ComputerGame.vue +++ b/client/src/components/ComputerGame.vue @@ -7,7 +7,6 @@ BaseGame(:game="game" :vr="vr" ref="basegame" import BaseGame from "@/components/BaseGame.vue"; import { store } from "@/store"; import Worker from "worker-loader!@/playCompMove"; - export default { name: "my-computer-game", components: { @@ -80,12 +79,8 @@ export default { if (!!this.gameInfo.fen) this.launchGame(); }, - // dans variant.js (plutôt room.js) conn gère aussi les challenges - // et les chats dans chat.js. Puis en webRTC, repenser tout ça. methods: { - launchGame: async function() { - const vModule = await import("@/variants/" + this.gameInfo.vname + ".js"); - window.V = vModule.VariantRules; + launchGame: function() { this.compWorker.postMessage(["scripts",this.gameInfo.vname]); this.compWorker.postMessage(["init",this.gameInfo.fen]); this.vr = new V(this.gameInfo.fen);