X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2Fgame.js;h=208e04824cfda2b5e37c8f8570b97b23e6d711f1;hp=6af331b3158cd6436e858a633eb933a979f97511;hb=331fc58c932d6d7055b202d0c6dc0d77212a89f8;hpb=f4fd6580a227a352f6e0e95870954bc2fa2ce97f diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js index 6af331b3..208e0482 100644 --- a/public/javascripts/components/game.js +++ b/public/javascripts/components/game.js @@ -1008,7 +1008,7 @@ Vue.component('my-game', { this.endGame(this.mycolor=="w"?"0-1":"1-0"); }, newGame: function(mode, fenInit, color, oppId, moves, continuation) { - const fen = "M7/8/8/3K1k2/8/8/8/8 0000";//fenInit || VariantRules.GenRandInitFen(); + const fen = fenInit || VariantRules.GenRandInitFen(); console.log(fen); //DEBUG if (mode=="human" && !oppId) { @@ -1066,7 +1066,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); }