X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRifle.js;h=631fb13ab06d02082091fac34f56869e2fc445b6;hb=e727fe31742dfb3e40eb222c94f4199e2be98453;hp=ccec48efdb0b5a05b7d72e5902f470bc9f559190;hpb=2a8a94c9e539319c76c0a72967b39f2e7e7b279e;p=vchess.git diff --git a/client/src/variants/Rifle.js b/client/src/variants/Rifle.js index ccec48ef..631fb13a 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" || move.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: [],