X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=9094309b447489d4f9c2b957d01a51cafc6941f7;hb=50330595f8a3055e0d568289e60c16402a15d320;hp=fa7ab3b29f67d7e9ef498e9c5cf5545b7ba52612;hpb=bf588c57bdac8525f57c2017b6e70e9390e06700;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index fa7ab3b2..9094309b 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -522,11 +522,7 @@ export default { }, getGameType: function(game) { if (!!game.id.toString().match(/^i/)) return "import"; - return ( - game.cadence.indexOf("d") >= 0 - ? "corr" - : (game.cadence.indexOf("/") >= 0 ? "simul" : "live") - ); + return (game.cadence.indexOf("d") >= 0 ? "corr" : "live"); }, // Notify something after a new move (to opponent and me on MyGames page) notifyMyGames: function(thing, data) { @@ -755,9 +751,9 @@ export default { case "newmove": { // DEBUG: -console.log("Receive move"); -console.log(data.data); -//moveslist not updated when receiving a move? (see in baseGame) +//console.log("Receive move"); +//console.log(data.data); +//moveslist not updated when receiving a move? (see in BaseGame) const movePlus = data.data; const movesCount = this.game.moves.length; @@ -1047,6 +1043,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 @@ -1068,7 +1065,6 @@ console.log(data.data); "/games", "POST", { - // cid is useful to delete the challenge: data: { gameInfo: gameInfo }, success: (response) => { gameInfo.id = response.gameId; @@ -1524,7 +1520,6 @@ console.log(data.data); }; if ( this.game.type == "corr" && - V.CorrConfirm && moveCol == this.game.mycolor && !data.receiveMyMove ) { @@ -1540,6 +1535,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);