Fix Absorption and Chakart variants
[vchess.git] / client / src / views / Game.vue
index cd781a5..776b9ea 100644 (file)
@@ -522,7 +522,11 @@ export default {
     },
     getGameType: function(game) {
       if (!!game.id.toString().match(/^i/)) return "import";
-      return game.cadence.indexOf("d") >= 0 ? "corr" : "live";
+      return (
+        game.cadence.indexOf("d") >= 0
+          ? "corr"
+          : (game.cadence.indexOf("/") >= 0 ? "simul" : "live")
+      );
     },
     // Notify something after a new move (to opponent and me on MyGames page)
     notifyMyGames: function(thing, data) {
@@ -1520,7 +1524,6 @@ console.log(data.data);
       };
       if (
         this.game.type == "corr" &&
-        V.CorrConfirm &&
         moveCol == this.game.mycolor &&
         !data.receiveMyMove
       ) {
@@ -1536,6 +1539,10 @@ console.log(data.data);
             if (data.score == "*") this.re_setClocks();
           }
         };
+        if (!V.CorrConfirm) {
+          afterSetScore();
+          return;
+        }
         let el = document.querySelector("#buttonsConfirm > .acceptBtn");
         // We may play several moves in a row: in case of, remove listener:
         let elClone = el.cloneNode(true);