X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FTakenmake.js;h=9549c2a92fa3a13dd01a42bb1e77d1d8eac3fa24;hb=2fac4d67083700a1f1e85ed8662c176c24cdea6b;hp=6cea420cacffff6cd38d3cdd340f8a5deeca8c7d;hpb=a9e1202b681d9d2f814767180183a0b04c58f8ab;p=vchess.git diff --git a/client/src/variants/Takenmake.js b/client/src/variants/Takenmake.js index 6cea420c..9549c2a9 100644 --- a/client/src/variants/Takenmake.js +++ b/client/src/variants/Takenmake.js @@ -2,6 +2,7 @@ import { ChessRules } from "@/base_rules"; import { randInt } from "@/utils/alea"; export class TakenmakeRules extends ChessRules { + setOtherVariables(fen) { super.setOtherVariables(fen); // Stack of "last move" only for intermediate captures @@ -22,7 +23,7 @@ export class TakenmakeRules extends ChessRules { 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 :) @@ -197,4 +198,5 @@ export class TakenmakeRules extends ChessRules { delete moves[mIdx]["next"]; return [moves[mIdx], move2]; } + };