X-Git-Url: https://git.auder.net/variants/%24%7Bobj.vname%7D/style.css?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FGame.vue;h=88f2b5e2fa73252d701b265e6b4f419143f65d59;hb=89021f181ac0689bbc785ce0ebd9a910e66352b0;hp=e83b9886694252eef919862e7aae6d57cf38fcb3;hpb=7f36b53a818bd707e49e7109275e3659e97d91b4;p=vchess.git diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index e83b9886..88f2b5e2 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -560,8 +560,13 @@ export default { GameStorage.get(this.gameRef.id, afterRetrieval); } }, - // Post-process a move (which was just played) + // Post-process a move (which was just played in BaseGame) processMove: function(move) { + if (this.game.type == "corr" && move.color == this.game.mycolor) + { + if (!confirm(this.st.tr["Are you sure?"])) + return this.$set(this.game, "moveToUndo", move); + } // Update storage (corr or live) if I play in the game const colorIdx = ["w","b"].indexOf(move.color); const nextIdx = ["w","b"].indexOf(this.vr.turn); @@ -686,6 +691,8 @@ export default { { GameStorage.update(this.gameRef.id, {score: score, scoreMsg: scoreMsg}); + // Notify the score to main Hall. TODO: only one player (currently double send) + this.send("result", {gid:this.game.id, score:score}); } }, },