Several small improvements + integrate options + first working draft of Cwda
[vchess.git] / client / src / variants / Benedict.js
index 039aaea..5584fb8 100644 (file)
@@ -1,6 +1,7 @@
 import { ChessRules, PiPo, Move } from "@/base_rules";
 
 export class BenedictRules extends ChessRules {
+
   static get HasEnpassant() {
     return false;
   }
@@ -13,22 +14,8 @@ export class BenedictRules extends ChessRules {
     );
   }
 
-  // TODO(?): some duplicated code in 2 next functions
-  getSlideNJumpMoves([x, y], steps, oneStep) {
-    let moves = [];
-    outerLoop: for (let loop = 0; loop < steps.length; loop++) {
-      const step = steps[loop];
-      let i = x + step[0];
-      let j = y + step[1];
-      while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) {
-        moves.push(this.getBasicMove([x, y], [i, j]));
-        if (oneStep) continue outerLoop;
-        i += step[0];
-        j += step[1];
-      }
-      // No capture check: handled elsewhere (next method)
-    }
-    return moves;
+  canTake() {
+    return false;
   }
 
   // Find possible captures from a square
@@ -166,4 +153,5 @@ export class BenedictRules extends ChessRules {
     };
     return super.getNotation(basicMove);
   }
+
 };