X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FCrazyhouse.js;fp=client%2Fsrc%2Fvariants%2FCrazyhouse.js;h=ff705c73d1fb6948c011b435784f6ed951ff49d4;hb=e727fe31742dfb3e40eb222c94f4199e2be98453;hp=16db148dba460ca06fa91c18d74bb5b1c11089cd;hpb=2a8a94c9e539319c76c0a72967b39f2e7e7b279e;p=vchess.git diff --git a/client/src/variants/Crazyhouse.js b/client/src/variants/Crazyhouse.js index 16db148d..ff705c73 100644 --- a/client/src/variants/Crazyhouse.js +++ b/client/src/variants/Crazyhouse.js @@ -28,6 +28,13 @@ export const VariantRules = class CrazyhouseRules extends ChessRules { }); } + getEpSquare(moveOrSquare) { + if (typeof moveOrSquare !== "object" || move.vanish.length > 0) + return super.getEpSquare(moveOrSquare); + // Landing move: no en-passant + return undefined; + } + static GenRandInitFen(randomness) { return ChessRules.GenRandInitFen(randomness) + " 0000000000 -"; }