Add Knightrelay1. Some fixes. Move odd 'isAttackedBy_multiple_colors' to Checkered...
[vchess.git] / client / src / variants / Enpassant.js
index 3f8f3b2..dc181ca 100644 (file)
@@ -203,15 +203,19 @@ export const VariantRules = class EnpassantRules extends ChessRules {
     return filteredMoves.filter(m => m.vanish.length == 1);
   }
 
-  isAttackedByKnight(sq, colors) {
+  isAttackedByKnight(sq, color) {
     return this.isAttackedBySlideNJump(
       sq,
-      colors,
+      color,
       V.KNIGHT,
       V.steps[V.KNIGHT]
     );
   }
 
+  static get SEARCH_DEPTH() {
+    return 2;
+  }
+
   static get VALUES() {
     return {
       p: 1,