Fix Vchess variant
[vchess.git] / client / src / variants / Vchess.js
index 8b59c86..c11cce4 100644 (file)
@@ -9,6 +9,16 @@ export class VchessRules extends ChessRules {
     );
   }
 
+  isAttackedByPawn(sq, color) {
+    return this.isAttackedBySlideNJump(
+      sq,
+      color,
+      V.PAWN,
+      V.steps[V.BISHOP],
+      "oneStep"
+    );
+  }
+
   getNotation(move) {
     let notation = super.getNotation(move);
     // If pawn captures backward, add an indication 'b'