X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=397ba521b2bd89f062e445b8f101df90735c621b;hb=55eb331d0a9262baafcae5a42258a44d00f38da4;hp=ca8a6bff425b917199e5287059de2d065d97f4c7;hpb=f6cc7faf4301dc4a7ae5bb07f16403f280beddc3;p=vchess.git diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index ca8a6bff..397ba521 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -574,7 +574,7 @@ Vue.component('my-game', { this.newGame("computer"); }, newGame: function(mode, fenInit, color, oppId, moves, continuation) { - const fen = "pppppppp/rnbqkbnr/8/8/8/8/PPPPPPPP/ROBQKBOR 1111"; //fenInit || VariantRules.GenRandInitFen(); + const fen = fenInit || VariantRules.GenRandInitFen(); console.log(fen); //DEBUG this.score = "*"; if (mode=="human" && !oppId) @@ -672,7 +672,7 @@ Vue.component('my-game', { this.selectedPiece.style.display = "inline-block"; this.selectedPiece.style.zIndex = 3000; let startSquare = this.getSquareFromId(e.target.parentNode.id); - this.possibleMoves = true//this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare) + this.possibleMoves = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare) ? this.vr.getPossibleMovesFrom(startSquare) : []; e.target.parentNode.appendChild(this.selectedPiece);