Add Konane, (very) early drafts of Emergo/Fanorona/Yote/Gomoku, fix repetitions detec...
[vchess.git] / client / src / base_rules.js
index 4c90f1d..0549139 100644 (file)
@@ -22,8 +22,8 @@ export const Move = class Move {
   constructor(o) {
     this.appear = o.appear;
     this.vanish = o.vanish;
-    this.start = o.start ? o.start : { x: o.vanish[0].x, y: o.vanish[0].y };
-    this.end = o.end ? o.end : { x: o.appear[0].x, y: o.appear[0].y };
+    this.start = o.start || { x: o.vanish[0].x, y: o.vanish[0].y };
+    this.end = o.end || { x: o.appear[0].x, y: o.appear[0].y };
   }
 };
 
@@ -136,6 +136,11 @@ export const ChessRules = class ChessRules {
     return false;
   }
 
+  // At some stages, some games could wait clicks only:
+  onlyClick() {
+    return false;
+  }
+
   // Some variants use click infos:
   doClick() {
     return null;