From: Benjamin Auder Date: Tue, 20 Nov 2018 01:59:03 +0000 (+0100) Subject: Fix mode in PGN X-Git-Url: https://git.auder.net/assets/css/current/%7B%7B?a=commitdiff_plain;h=0869b00a0e716a559c7a70ba2d854eed91689e33;p=vchess.git Fix mode in PGN --- diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 8e8e2770..96833bc0 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -616,6 +616,7 @@ Vue.component('my-game', { this.oppConnected = true; this.mycolor = color; this.seek = false; + this.mode = "human"; if (!!moves && moves.length > 0) //imply continuation { const lastMove = moves[moves.length-1]; @@ -628,6 +629,7 @@ Vue.component('my-game', { } else //against computer { + this.mode = "computer"; this.mycolor = Math.random() < 0.5 ? 'w' : 'b'; if (this.mycolor == 'b') setTimeout(this.playComputerMove, 500);