X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=6570cb78572e4f8b14de51417036e998cfdf86ed;hb=4a82dadb64b0a63b909e50cfeb5283609cbaa466;hp=d702b0ec3b187bf47a2e46b0a5977b16c0144f1f;hpb=beda3dd096a455ed337eaaeadc400712bf0f5c6d;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index d702b0ec..6570cb78 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -182,6 +182,12 @@ main // TODO: this will be a component instead ? // If simultaneous games, no "rematch" button +// simult : open connexion to rooms from list, in all (if I'm the "simultaneer" --> TODO: indicate sid + side [random,white, black] in challenge) +// if I'm just one of the players (one game), just one game. +// view "Game_s", with pug list of components Game. +// generally only one element, unless I'm the simultaneer. +// Add messages ? + import BaseGame from "@/components/BaseGame.vue"; import UserBio from "@/components/UserBio.vue"; import Chat from "@/components/Chat.vue"; @@ -1050,6 +1056,7 @@ console.log(data.data); let gameInfo = { id: getRandString(), //ignored if corr fen: V.GenRandInitFen(this.game.randomness), + randomness: this.game.randomness, players: [this.game.players[1], this.game.players[0]], vid: this.game.vid, cadence: this.game.cadence @@ -1071,7 +1078,6 @@ console.log(data.data); "/games", "POST", { - // cid is useful to delete the challenge: data: { gameInfo: gameInfo }, success: (response) => { gameInfo.id = response.gameId; @@ -1527,7 +1533,6 @@ console.log(data.data); }; if ( this.game.type == "corr" && - V.CorrConfirm && moveCol == this.game.mycolor && !data.receiveMyMove ) { @@ -1543,6 +1548,10 @@ console.log(data.data); if (data.score == "*") this.re_setClocks(); } }; + if (!V.CorrConfirm) { + afterSetScore(); + return; + } let el = document.querySelector("#buttonsConfirm > .acceptBtn"); // We may play several moves in a row: in case of, remove listener: let elClone = el.cloneNode(true);