X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FTakenmake.js;h=d37edf6c658ab2de25e3d0fd9168079032988b6e;hb=21704b041240cb440d03cfa64a90ed0be6f28415;hp=5c0ac08ee9392bd0c74867973fe751558ccbec5f;hpb=7e8a7ea1cb66adb4a987badfb0a3c2f99a21bd0a;p=vchess.git diff --git a/client/src/variants/Takenmake.js b/client/src/variants/Takenmake.js index 5c0ac08e..d37edf6c 100644 --- a/client/src/variants/Takenmake.js +++ b/client/src/variants/Takenmake.js @@ -13,17 +13,16 @@ export class TakenmakeRules extends ChessRules { const L = this.lastMoveEnd.length; if (!asA && !!this.lastMoveEnd[L-1]) { asA = this.lastMoveEnd[L-1].p; - if (x != this.lastMoveEnd[L-1].x || y != this.lastMoveEnd[L-1].y) { + if (x != this.lastMoveEnd[L-1].x || y != this.lastMoveEnd[L-1].y) // A capture was played: wrong square return []; - } } let moves = []; const piece = this.getPiece(x, y); switch (asA || piece) { case V.PAWN: if (!asA || piece == V.PAWN) - moves = this.getPotentialPawnMoves([x, y]); + moves = super.getPotentialPawnMoves([x, y]); else { // Special case: we don't want promotion, since just moving like // a pawn, but I'm in fact not a pawn :)