X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FComputerGame.vue;fp=client%2Fsrc%2Fcomponents%2FComputerGame.vue;h=9699c5a87fbed724746aa4e28669d79ea65bd8a4;hb=4404e58c0a30105472942367dce894223b05c7fe;hp=aee1f70ef7fcedc4cdb87c0eeb352c833bc3000e;hpb=658c47bf5843fb0855659f22f7b1c38318c66ce5;p=vchess.git diff --git a/client/src/components/ComputerGame.vue b/client/src/components/ComputerGame.vue index aee1f70e..9699c5a8 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