From: Benjamin Auder <benjamin.auder@somewhere>
Date: Fri, 8 Nov 2019 18:11:46 +0000 (+0100)
Subject: TODO: debug auto mode (newmove event not triggered?). Then corr
X-Git-Url: https://git.auder.net/variants/current/css/img/pieces/doc/common.css?a=commitdiff_plain;h=7667307fada9f344e66e664b3bc3001326c36e88;p=vchess.git

TODO: debug auto mode (newmove event not triggered?). Then corr
---

diff --git a/client/src/components/ComputerGame.vue b/client/src/components/ComputerGame.vue
index f5d46237..f69e1e6c 100644
--- a/client/src/components/ComputerGame.vue
+++ b/client/src/components/ComputerGame.vue
@@ -93,17 +93,25 @@ export default {
         this.playComputerMove();
     },
     playComputerMove: function() {
+
+console.log("call comp move");
+
       this.timeStart = Date.now();
       this.compWorker.postMessage(["askmove"]);
     },
     // TODO: do not process if game is over (check score ?)
     processMove: function(move) {
+console.log("play move");
+      console.log(move);
       // Send the move to web worker (including his own moves)
       this.compWorker.postMessage(["newmove",move]);
       // subTurn condition for Marseille (and Avalanche) rules
       if ((!this.vr.subTurn || this.vr.subTurn <= 1)
         && (this.gameInfo.mode == "auto" || this.vr.turn != this.game.mycolor))
       {
+
+console.log("ask new comp move");
+
         this.playComputerMove();
       }
     },