X-Git-Url: https://git.auder.net/img/rock_paper_scissors_lizard_spock.gif?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRifle.js;h=1cdbbbe4ecce35cf64cfb07c8fb548308882d843;hb=42a9284896b9cf9a579d32b7cf77dfc1f5786472;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: [],