X-Git-Url: https://git.auder.net/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fcomponents%2FComputerGame.vue;h=5782ba6a788d2e8b2621a381af21d6172645d6ee;hb=efdfb4c70f4a4391b8571726d924cdf58baba41c;hp=aee1f70ef7fcedc4cdb87c0eeb352c833bc3000e;hpb=e71161fbfffe53b0f4b174e0467cdd98cc70b7b0;p=vchess.git diff --git a/client/src/components/ComputerGame.vue b/client/src/components/ComputerGame.vue index aee1f70e..5782ba6a 100644 --- a/client/src/components/ComputerGame.vue +++ b/client/src/components/ComputerGame.vue @@ -38,7 +38,8 @@ export default { this.compWorker.onmessage = e => { let compMove = e.data; // Small delay for the bot to appear "more human" - const delay = Math.max(500 - (Date.now() - this.timeStart), 0); + const minDelay = this.gameInfo.mode == "versus" ? 500 : 1000; + const delay = Math.max(minDelay - (Date.now() - this.timeStart), 0); let self = this; setTimeout(() => { if (this.currentUrl != document.location.href) return; //page change @@ -57,7 +58,7 @@ export default { if (!game) { game = { vname: this.gameInfo.vname, - fenStart: V.GenRandInitFen(), + fenStart: V.GenRandInitFen(this.st.settings.randomness), moves: [] }; game.fen = game.fenStart;