From 1d67d9611c52fbe667cea39f68098f4e52464223 Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Thu, 23 Jul 2020 00:15:53 +0200 Subject: [PATCH] Fix Vchess variant --- client/src/variants/Vchess.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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' -- 2.44.0