X-Git-Url: https://git.auder.net/assets/icon_infos.svg?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=ca8a6bff425b917199e5287059de2d065d97f4c7;hb=f6cc7faf4301dc4a7ae5bb07f16403f280beddc3;hp=5690eb14e96ccd8df485e5131b42c338ea2fa1f2;hpb=f3c10e18c1585f043e22b875e9755814fa9218d7;p=vchess.git diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 5690eb14..ca8a6bff 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 = fenInit || VariantRules.GenRandInitFen(); + const fen = "pppppppp/rnbqkbnr/8/8/8/8/PPPPPPPP/ROBQKBOR 1111"; //fenInit || VariantRules.GenRandInitFen(); console.log(fen); //DEBUG this.score = "*"; if (mode=="human" && !oppId) @@ -672,10 +672,9 @@ 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 = this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare) + this.possibleMoves = true//this.mode!="idle" && this.vr.canIplay(this.mycolor,startSquare) ? this.vr.getPossibleMovesFrom(startSquare) : []; - console.log(this.possibleMoves); e.target.parentNode.appendChild(this.selectedPiece); } },