X-Git-Url: https://git.auder.net/assets/current/git-logo.png?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRifle.js;h=1cdbbbe4ecce35cf64cfb07c8fb548308882d843;hb=3a2a7b5fd3c6bfd0752838094c27e1fb6172d109;hp=ccec48efdb0b5a05b7d72e5902f470bc9f559190;hpb=f35b9960e1c527fc400ebac85321bd4712459da3;p=vchess.git diff --git a/client/src/variants/Rifle.js b/client/src/variants/Rifle.js index ccec48ef..1cdbbbe4 100644 --- a/client/src/variants/Rifle.js +++ b/client/src/variants/Rifle.js @@ -1,6 +1,13 @@ import { ChessRules, PiPo, Move } from "@/base_rules"; export const VariantRules = class RifleRules extends ChessRules { + getEpSquare(moveOrSquare) { + if (typeof moveOrSquare !== "object" || moveOrSquare.appear.length > 0) + return super.getEpSquare(moveOrSquare); + // Capturing move: no en-passant + return undefined; + } + getBasicMove([sx, sy], [ex, ey], tr) { let mv = new Move({ appear: [],