X-Git-Url: https://git.auder.net/img/rock_paper_scissors_lizard_spock.gif?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=96833bc087130bc138690a86d9102314d55c2e2e;hb=0869b00a0e716a559c7a70ba2d854eed91689e33;hp=8e8e277009e1a95f26f2ad861b3f5832b4edf303;hpb=46302e643947a66a5593a8eb1140d314effcea95;p=vchess.git 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);