Fix Berolina en passant
[vchess.git] / client / src / components / ComputerGame.vue
index aee1f70..5782ba6 100644 (file)
@@ -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;