From: Benjamin Auder <benjamin.auder@somewhere>
Date: Wed, 22 Jul 2020 22:15:53 +0000 (+0200)
Subject: Fix Vchess variant
X-Git-Url: https://git.auder.net/doc/html/css/scripts/pieces/mini-custom.min.css?a=commitdiff_plain;h=1d67d9611c52fbe667cea39f68098f4e52464223;p=vchess.git

Fix Vchess variant
---

diff --git a/client/src/variants/Vchess.js b/client/src/variants/Vchess.js
index 8b59c863..c11cce4e 100644
--- a/client/src/variants/Vchess.js
+++ b/client/src/variants/Vchess.js
@@ -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'