X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=deccd5da0c6bd5686b914ad8f614682c157bf9db;hb=523da5d5adeb4abd8b165158485314d0e7de9cf4;hp=202f542a530b56e359b0cf932198ae36367b9f4d;hpb=c364df7516985616b09ee9ec3c4671ed6fd3ef8b;p=vchess.git diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 202f542a..deccd5da 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -1014,7 +1014,7 @@ Vue.component('my-game', { this.endGame(this.mycolor=="w"?"0-1":"1-0"); }, newGame: function(mode, fenInit, color, oppId, moves, continuation) { - const fen = "3N1K2/2n2q2/P1R1kPnN/p3b1p1/b7/5Q2/4r3/8 0000";//fenInit || VariantRules.GenRandInitFen(); + const fen = fenInit || VariantRules.GenRandInitFen(); console.log(fen); //DEBUG if (mode=="human" && !oppId) { @@ -1072,7 +1072,7 @@ Vue.component('my-game', { } else if (mode == "computer") { - this.mycolor = "w";//Math.random() < 0.5 ? 'w' : 'b'; + this.mycolor = Math.random() < 0.5 ? 'w' : 'b'; if (this.mycolor == 'b') setTimeout(this.playComputerMove, 500); }